Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following UML diagram: Part 1: Implement the following classes: Note that some files can be encrypted. (65 pts) Folder (30 pts) -name: String

image text in transcribed

image text in transcribed

Given the following UML diagram: Part 1: Implement the following classes: Note that some files can be encrypted. (65 pts) Folder (30 pts) -name: String - File: ArrayList + Folder(name: String) + getName(): String + addJava(j: Java): vold + addDatabaseld: Database): vold + getFile(): ArrayList + countJaval): int + countEncryptedjaval): int + searchForDb((name: String): Database + toString(): String File (15 pts) -name: String - size: int - encrypted: boolean + File ---All Parameters) + setters/getters +toString(): String Database (10 pts) - tables: int + Street ----All Parameters----) + setter/getter + toString(): String Java (10 pts) - Classes: int + Java-All Parameters) + setter/getter + toString(): String For each class you should write a toString method that returns (string) the characteristics of class. 1. Create File Class (superclass) of all files (Java, Database). a) Declare three attributes as follow string name, integer size, and Boolean encrypted. b) Define a constructor with all parameters c) Implement the setters and getters 2. Create the Java class which extends File class a. Declare integer attribute called classes which hold the number of classes in a java file b. Define a constructor will all parameters an inherit the attributes from the super class c. Implement the setters and getters 3. Create the Database class that extends File Class a. Declare integer attribute called tables that holds the number of tables in Database file b. Define a constructor will all parameters an inherit the attributes from the super class c. Implement the setters and getters 4. Implement a Class called Folder that includes un ArrayList containing files a. addJava() add a file of type java to the folder (the ArrayList) b. addDatabase() add a database file to the folder (the ArrayLits) c. getFile() return a string showing the information about all files in the ArrayList. d. countJava return the number of java files in a Folder e, countEncryptedJavu() return the number of encrypted java files in a Folder f. searchForDBO) display the name of given file name in a folder if found or display "not found" if it's not in the folder

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago