Question: Please use Java programimng Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop - name: String - devices: ArrayList +

 Please use Java programimng Consider the TechShop, Device, Laptop and Usb

classes described in the following UML: TechShop - name: String - devices:Please use Java programimng

Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop - name: String - devices: ArrayList + TechShop (name: String) + addDevice(d: device): void + getDevices(type: int): ArrayList + toString(: String Device #brand: String #price: double + Device (all arguments) + toString0 : String +//getters & Setters methods + is Alternative(o: Object): boolean Laptop - cpu: String type: String + Laptop (all arguments) + toString(): String + getCpu():String + getType():String Usb storage: int + Usb (all arguments) + toString(): String 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 (Laptop1 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() +add(o: E): void +addindex: int, o: E): void +clear(): void +contains(o: Object): boolean +get(index: int): E +indexOf(o: Object); int +isEmpty(): boolean +lastIndexOf(o: Object): int +remove(o: Object): boolean +size(): int +remove(index: int): boolean +set(index: int, o: E): E

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!