Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA CODE Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop name: String - devices: ArrayList Device + TechShop (name:
JAVA CODE
Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop name: String - devices: ArrayList Device + TechShop (name: String) Device + addDeviceld: device) void brand: String + getDevices(type: int): ArrayList Device price: double +toString): String +Device (all arguments) toString(): String + letters & Setters methods + is Alternative: Object): boolean Laptop -cpu: String -type: String + Laptop (all arguments) +toString(): String + getString getType-String USD storage: int + Usb (all arguments) toString): String Part III Question 1: (20 points) Write an application that: Creates a TechShop called "Modern Technology" b. Add three objects to the TechShop, two Laptops (Laptop and Laptop2) and a USB from values set by the programmer & Display information about all the Laptops in the TechShop that could be alternative to Laptopl. & Display all information about laptops in the TechShop whose type is "Ultrabook" and epuis "corei?". java.util.Array> ArrayListo add: E): void -addindex: into E); void clearvoid +contains: Object): boolean +yetindex: int): +indexOfo: Object); int +isEmpty(): boolean lastIndexOR: Object); int removeo: Objectboolean size(): int +removeindex:int): boolean setindex: inta: E): Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop name: String - devices: ArrayList Device + TechShop (name: String) Device + addDeviceld: device) void brand: String + getDevices(type: int): ArrayList Device price: double +toString): String +Device (all arguments) toString(): String + letters & Setters methods + is Alternative: Object): boolean Laptop -cpu: String -type: String + Laptop (all arguments) +toString(): String + getString getType-String USD storage: int + Usb (all arguments) toString): String Part III Question 1: (20 points) Write an application that: Creates a TechShop called "Modern Technology" b. Add three objects to the TechShop, two Laptops (Laptop and Laptop2) and a USB from values set by the programmer & Display information about all the Laptops in the TechShop that could be alternative to Laptopl. & Display all information about laptops in the TechShop whose type is "Ultrabook" and epuis "corei?". java.util.Array> ArrayListo add: E): void -addindex: into E); void clearvoid +contains: Object): boolean +yetindex: int): +indexOfo: Object); int +isEmpty(): boolean lastIndexOR: Object); int removeo: Objectboolean size(): int +removeindex:int): boolean setindex: inta: E)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started