Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

@override Consider the TechShop, Device, Laptop and Usb classes described in the following UML: TechShop name: String - devices: ArrayList + TechShop (name: String) +

image text in transcribedimage text in transcribed@override

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) + toString(): String + //getters & Setters methods + isAlternative(o: Object): boolean Laptop cpu: String type: String + Laptop (all arguments) + toString(): String + getCpuo: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 (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 +ArrayListo +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

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

What is the difference between a BA and commercial paper?

Answered: 1 week ago