Question: Question 1: (10 Points) Continue the implementation of the class Laptop a. Implement the isAlternative method of signature public boolean isAlternative (Object o). Two Laptops

 Question 1: (10 Points) Continue the implementation of the class Laptop

Question 1: (10 Points) Continue the implementation of the class Laptop a. Implement the isAlternative method of signature public boolean isAlternative (Object o). Two Laptops are alternatives if they have the same type and the same cpu. Question 2: (26 Points) Implement the class TechShop. a Constructor set the name of the TechShop, and initializes the ArrayList for devices b. addDevice (device: Device): This method adds a Device to devices ArrayList. c. getDevices(): This method returns the list of devices Question 3: (14 Points) Continue the implementation of the class TechShop. Implement the toString method. It returns information about all the devices in the ArrayList devices. TechShop Name: Modern Technology Devices: Laptop Brand: HP Price: 500 dollars. Cpu: corei7 And Type:Ultrabook Laptop Brand: Lenovo Price 600 dollars. Cpu: coreis And Type: Notebook Usb Brand: SanDisk Price: 30 dollars. Storage is 32 GB Part III Question 1: (20 Points) Write an application that: a Creates a TechShop called "Modern Technology". b. Add three objects to the TechShop, two Laptops (Laptopl and Laptop2) and a USB from values set by the programmer c. Display information about all the Laptops in the TechShop that could be alternative to Laptopl. d Display all information about laptops in the TechShop whose type is Ultrabook" and cpu is corei7". java.util.ArrayList +ArrayList() taddo: E)void tadd index: into: Ex void +clear(): void + containso: Object): boolean +get index: int): E +indexOf(o: Object); int +isEmpty) boolean lastIndexOf(o: Object); int +remove(o: Object): boolean +size): int +removed index: int): boolean salinduxit

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!