Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i must to do this exercise plz someone help me i don't know how to start this exercise
Exercise


Create an application that functions as file manager. The application must have the following functions:
• Reviewing folders,
• displaying information about files / folders in tabular form,
◦denumire,
◦path,
◦size,
◦data creation,
◦data last modification,
• Creating folders,
• option for renaming files / folders,
• option for copying files / folders full
• option for moving files / folders full
• Option to delete files / folders.

You use the following commands sfătuitm for these operations, in this order: LIST, INFO, CREATE_DIR, RENAME, COPY, MOVE, DELETE.

Once you enter a command in the console, the application displays about ordering recognized (or not recognized, if the order is wrong) and continues to collect information necessary to perform all the operations specified above
Posted
Updated 20-Jul-15 5:13am
v5
Comments
[no name] 20-Jul-15 10:21am    
If you do not understand your homework assignment, ask your teacher. If you do not have a teacher, get yourself a decent book on programming and work through it.
Sergey Alexandrovich Kryukov 20-Jul-15 10:52am    
...or ask some real questions here, after you get familiar with relevant subjects.
—SA

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

So start at the beginning, and create a console application.
Loop round, reading a line from the user, and comparing it to the list of "keywords" you have been given.
Then all you have to do is implement each command in turn.
 
Share this answer
 
Comments
Member 11849615 20-Jul-15 12:22pm    
i made something but i don't understand something how to implement that in tabular form ,Reviewing Folders? i Need a loop
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributeView;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.text.SimpleDateFormat;
import teste.FileCreationTime;

public class path {
public static FileTime getCreationTime(File file) throws IOException {
Path p = Paths.get(file.getAbsolutePath());
BasicFileAttributes view
= Files.getFileAttributeView(p, BasicFileAttributeView.class)
.readAttributes();
FileTime fileTime=view.creationTime();
// also available view.lastAccessTine and view.lastModifiedTime
return fileTime;
}
public static void main(String[] args) throws IOException
{
File path = new File("C:\\CiprianAssignment.txt");

System.out.println("Name = " + path.getName());
System.out.println("Lenght = " + path.length() + " Bytes");
System.out.println(path + " creation time :"
+ new SimpleDateFormat("dd/MM/yyyy HH:mm:ss")
.format(FileCreationTime.getCreationTime(path).toMillis()));
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
System.out.println("Last Modified : " + sdf.format(path.lastModified()));

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900