Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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

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

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

2. What, according to Sergey, was strange at this meeting?

Answered: 1 week ago

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago