Object Oriented Programming (OOP) Assignment: 3 40 Minutes Name: Group: ID: Date: Problem 1: Description [5 Marks] Use t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Object Oriented Programming (OOP) Assignment: 3 40 Minutes Name: Group: ID: Date: Problem 1: Description [5 Marks] Use t

Post by answerhappygod »

Object Oriented Programming Oop Assignment 3 40 Minutes Name Group Id Date Problem 1 Description 5 Marks Use T 1
Object Oriented Programming Oop Assignment 3 40 Minutes Name Group Id Date Problem 1 Description 5 Marks Use T 1 (67.92 KiB) Viewed 10 times
Object Oriented Programming (OOP) Assignment: 3 40 Minutes Name: Group: ID: Date: Problem 1: Description [5 Marks] Use the following UML Diagram to write a Java program that consists of multiple classes: Electronics + Price: int + Maker: String <<Interface>> Kitchenware + electronics () + getEnergySource (): String + cockMethod () Oven + energySource: String + oven() + getEnergySource (): String + cockMethod() Tv + tv () + Remote Control ()

1- Electronics Class: root/parent/super class a- Electronics method: receives arguments to initialize price and maker. b- Maker: means company or country. 2- Tv Class: extends Electronics class a- Electronics method: receives arguments to initialize price and maker. b- Remote Control method: prints out the following sentence: "The TV made by (maker) which costs (price) is operated by remote control only." 3- Kitchenware Interface: Create the interface 4- Oven Calss: extends Electronics class and implement Kitchen Ware interface a- Add String variable (cookWay) as instance variable to the class. (Cook way means: uses heat or air or oil to make the food cooked) b- energySource: means electricity or gas. c- Oven method: receives arguments to initialize energy Source, cookWay, price and maker. d- getEnergy Source method: return energySource as String. c- cookMethod method: prints out the following sentence: "The Oven made by (maker) which costs (price) is using (energy Source) to cock food using (cookWay)." 5- On the Main class, create Tv object and use it to call remote Control method. Create Oven object and use it to call getEnergySourcs and cookMethod. Hint: Use your own values. (For example: A Tv made bu LG that costs 2000s.r.) (For example: An Oven that made by Gelmgas that costs 3500s.r. and use electricity as energy source to cook using heat)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply