Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve in 30 minutes java. Task 2: 5+ 10 + 10 = 25 Points Implement the following classes, each on a separate file: My

image text in transcribedplease solve in 30 minutes java.

Task 2: 5+ 10 + 10 = 25 Points Implement the following classes, each on a separate file: My Device > > -networks: String[] Camera -price: Double +takePicture(): void /*Constructor, getter-setter*/ +takeVideo(): void + portable (): void SmartPhone -phone Number: int /*Constructor, getter-setter*/ +toString(): String Laptop - eMail: String /*Constructor, getter-setter*/ +toString(): String Now write a test program and create two SmartPhone and Laptop objects using user input. Throw an exception that you define if the price input is negative. For SmartPhone class, the portable() method should display "On hand. For Laptop class the portable() method should display "On lap". Then invoke their toString(), takePicure() and take Video() methods. For SmartPhone the takePicure() method should display Picture snap. For Laptop the takePicure() method should display Picture is taken. For SmartPhone the take Video() method should display "Video good. For Laptop the take Video() method should display "Video is best". The toString() method should display the values for all the data fields. Write the objects to a file and read from the file again to display the toString() for the device with the highest price

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

what is the future value of $100,000, interest 18%, for 24 years?

Answered: 1 week ago