Question: Please give me only An image file showing the modified design as a UML class diagram. i only need a clear UML diagram, dont need

Please give me only An image file showing the modified design as a UML class diagram. i only need a clear UML diagram, dont need the codes. hand written or system drawn is ok
Task 1
FileSystem is a class that contains knowledge of folders and files within a system. Individual folders in
this system are represented by instances of the Folder class, and can be added to the file system us-
ing AddFolder. Individual files in this system are represented by instances of the File class, and can
be added to the file system using AddFile. Every folder and file has:
A name
A method which returns its size in bytes
For files this method simply returns the size of the file
For folders this method returns the sum of the sizes of all of the files it contains
A method to print a description of itself
For files this description is the file's name, extension, and size
For folders this description is the folder name, followed by a description of each of the files
and/or subordinate folders it contains.
A folder has the ability to add files to its collection.
A summary of all of the folders and files in the file system can be printed to the terminal using
the PrintContents method of the FileSystem class. The following content is an example output of
calling PrintContents:
This File System contains:
The Folder: 'Saved Files' contains 5 files totalling 23780 bytes:
File 'Martin The Warrior by Brian JAcques.text' Size: 3720 bytes
File 'Northem Lights by Philip Pullman.text' Size: 3990 bytes
File 'The Escapement by K. J. Parker.text' Size: 4070 bytes
File 'Snow Crash by Neal Stephenson.text' Size: 4400 bytes
File 'Renegade's Magic by Robin Hobb.text' Size: 7600 bytes
The Folder: 'New Project' is empty!
File 'ArtWork.jpg' Size: 5342 bytes
File 'PriceLlist.xls' Size: 832 bytes
You may have noticed that there is a big issue with the abstraction in this program design. Currently,
folders can only contain files! In a real file system, folders can contain folders and/or files.
Your task is to redesign this program to represent a more accurate abstraction of a file system. To do
this, you should restructure the program to use an abstract Thing class. This class should adhere to
the following UML design:
To implement this new class and integrate it with our existing design, use the following steps:
Implement the Thing abstract class according to the above design.
Update Folder so that it now stores instances of Thing instead of File.
Redesign and implement the Folder and File classes to be child classes of the new Thing class.
Modify FileSystem to have only one collection, called _contents.
Replace the AddFolder and AddFile methods in FileSystem with a single method called Add.
Implement a PrintContents method in FileSystem.
Let A be an array of the first 10 prime numbers, e.g.2,3,5,7,11,13,17,19,23,29, where
index index index index index index index {:?6]=17,
index index {:?B]=23, and index {:?9]=29.
Use the last four digits of your student ID as indices, manually identify your new array called B where each
element in B is the index into the array A. For example, a student ID ending '9270' will have the array of
index {:?9] A[index index index {:?0], then B=[29,5,19,2].
Write a Main method to demonstrate how your new design works. Make sure you clearly show:
a) Creating a FileSystem.
b) Adding a number of B[0] files to the file system. For example, if B[0]=29,29 files will be added. Each
file should be named with the format "YourStudentID-index.txt". For example, '1119270-00.txt",
'1119270-01.txt',...,'1119270-28.txt'
c) Adding a folder that contains a number of B[1] files to the file system. The files have above format name.
d) Adding a folder that contains a folder that contains B[2] files to the file system.
e) Adding a number of B[3] empty folders to the file system.
f) Calling the PrintContents method.
You are required to:
a) Provide a new UML class diagram for your updated design (hand drawn is fine).
b) Write the code for all classes, including the
 Please give me only An image file showing the modified design

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!