Please use c++. Deadline is may 13, finish until then
please.
Multi-linked List Implementation to Display Directory Contents In this assignment, you will write a utility that is used to view a directory's contents. The utility will work with three properties of a file: File Name: The relative name of a file. Note that a file can be named as "C:\Directory1\file.txt". This naming is called absolute naming and covers the file name and its whole path. The relative name of the file name is the name with respect to the current directory. Since we only work with the files in the applications current directory, "file.txt" will be used as its name in the application. Extension: Extension defines the file's type. It is the character string after the last dot of a file name. For example, if the filename is "hello.world.txt", the extension is "txt". Note that some files may not have an extension, for those files, you may use an empty string or a flag like "NO_EXTENSION” for the sake of simplicity. File Size: It should be the file size in bytes. Note that the files may be in gigabytes range. The application will read all the files in its current directory, and build a multi-linked list with these three properties as keys. Each linked list will be in ascending order. For filename and extension, alphabetic order, for file size numeric order will be used. The structures are allocated once. There will be three linked lists. The first linked list is the filename linked list as depicted in the following diagram. The header contains the count, filename head, filename rear, extension head, extension rear, file size head and file size rear respectively.
abc.txt efg.exe klm.exe xyz.com TXT EXE EXE COM 400000 bytes 500 bytes 10000 bytes 50000 bytes The second linked list is the file type linked list as depicted in the following diagram. The order of the extension will be COM->EXE->EXE->TXT in this case. abc.txt efg.exe klm.exe xyz.com TXT EXE EXE COM 500 bytes 40000 bytes 10000 bytes 50000 bytes The third linked list is the file size linked list as depicted in the following diagram.
abc.txt efg.exe klm.exe xyz.com TXT EXE EXE COM 500 bytes 40000 bytes 10000 bytes 50000 bytes After the multi-linked list is constructed, the application will display following menu items to the user: Search filename: The user will enter a filename. If it is found in the list, the application will print all the information about the filename to the user. Search extension: This will print all the files with the given extension to the screen. Search file size: The files that have file size greater than the given value will be displayed. For example, if user enters 10000, the files that are greater than 10000 bytes will be displayed. Remove filename from list: The user will enter a filename. If it is found, the file will be deleted from the list. Update the list: The application will destroy the linked list and re-build it by reading the directory contents again. Traverse list: The application will print the file information in sorted order. The user will select which order to use. Traversal can be in the order of filename, file size or file extension. You need to paginate information displayed if it contains more that 40 entries. (This number depends how you display the files. So you may choose another number.) In each screen, there will be 40 entry listed, and when user press enter the next page of list will be displayed. Exit: The application will end.
Multi-linked List Implementation to Display Directory Contents In this assignment, you will write a utility that is used
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Multi-linked List Implementation to Display Directory Contents In this assignment, you will write a utility that is used
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!