Question: Please i need the solution within 1 hour with java language Given the following UML diagram: Part 1: Implement the following classes. Check the notes

Please i need the solution within 1 hour with java language

Please i need the solution within 1 hour with java language Given

the following UML diagram: Part 1: Implement the following classes. Check the

Given the following UML diagram: Part 1: Implement the following classes. Check the notes below before you start: Device - code: int - price: double - brand : String + device ----All Parameters----) + setters/getters + toString(): String Invoice - client: String - items: Device[ - nbofitems: int + Invoice (client: String) + getClient (): String + addNewDevice(d: Device): void + countTVs(minSize : int) : int + findPC(ram :int): boolean + calculateTotalPrice():double TV - size: int PC + TV (----All Parameters----) - capacity: int + setter/getter - ram: int + toString(): String 1. + PC(----All Parametebe-Device class: (10pts) a. + setter/getter The ToString method should + toString(): String return a String similar to : Code:111, Brand: Samsung, Price: 1900$ 2. The TV class: (10pts) a. The ToString method should return a String similar to : TV: 42 inch, Code:111, Brand: Samsung, Price: 1900$ 3. The PC class: (10pts) a. The ToString method should return a String similar to : PC: Capacity: 256 GB, Ram: 8GB, Code:111, Brand: Samsung, Price: 1900$ 4. The Invoice class: (50pts) a. The items array can have at most 10 elements. b. The client field should include a String (the name of the client) c. The nbofltems should register the real number of devices (how many elements has been added to the array). d. The Invoice (client: String) constructor create an object with the given client name, Item array size 10 and nbofitems equal to zero e. The addNewDevice(d: Device) method will add a new device object to the array item if this array is not full. f. countTVs(minSize : int) returns how many TV in the array have a size greater than or equal the given size g. findPc(Ram :int) returns true if it finds a PC object with the given specification in the array "Item". False otherwise. h. calculate TotalPrice() returns the sum of prices of all items in the array Part 2: Implement a driver class (main class) as follows: (20pts) 1. Create an Invoice object with client name read from the user. 2. Add to the Invoice object 2 TV objects and 1PC of your choice. 3. Add to the invoice object one TV of type "Samsung" size 42 and price 1500 and code 111. 4. Display the number of TVs with minimum size 30. 5. Display the total price of the invoice. 6. Check and display if there is a PC item Ram equal to 8

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!