Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions