Question: a) explain what is happening when toString() is called for each of the objects through the printFileSyatem() method b) explain how the searchSize() method has

 a) explain what is happening when toString() is called for each

of the objects through the printFileSyatem() method b) explain how the searchSize()

a) explain what is happening when toString() is called for each of the objects through the printFileSyatem() method

b) explain how the searchSize() method has been implemented and what aspect of OOP enables this

Using your knowledge of OOP, design and implement the classes described above. Specific Requirements: You should submit 5 Java files: GenericFile.java, Word.java, Video.java. FileSystem.java and TestFile System.java Your FileSystem class is in charge of maintaining the objects (i.e. the GenericFiles). The FileSystem constructor should take an int which specifies the number of files the FileSystem can hold, and should provide the following publicly accessible methods: public boolean createFile(String filestring); The boolean will indicate whether the file was successfully created. Returns false if the File System is full or if there is a duplicate file name fileString will come in the following format: GFILE I WORD I VIDEO I I||kheight> public boolean fileExists (String filename); The boolean will indicate whether the file exists or not, returns true if it does and false if it doesn't public void printFileSystem(); This should call the toString() method of each object and print it to the screen in the same format as the fileString inputs public void format); This should empty the entire file system, restore it to a blank state public String[] searchSize(int filesize, int operation); searchSize will return an array of filenames which match the criteria: filesize is the search parameter and operation is an int between 1-3 (1 is -, 2 is ) We will not use your TestFileSystem,java for testing, we will call FileSystem directly

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 Databases Questions!