Answered step by step
Verified Expert Solution
Question
1 Approved Answer
OBJECT ORIENTED PROGRAMMING LESSON LABORATORY EXERCISE - 1 0 Problem: Create the classes and interfaces on the UML class diagram. Create an arraylist and add
OBJECT ORIENTED PROGRAMMING LESSON
LABORATORY EXERCISE
Problem: Create the classes and interfaces on the UML class diagram.
Create an arraylist and add mobilephone objects with different properties. For Example different os different brand etc.
From to all other sections create different for loops to print and place mark to seperate the results of the operations.
Call all mobilephone object's toString method. In this case toString method of Computer is inherited
Call all mobilephone object's camera object's toString method.
Call all mobilephone object's camera object's brand property.
Call all mobilephone object's os property.
Call all mobilephone object's makeCall method.
Call all mobilephone object's playVideo method.
Call all mobilephone object's pauseVideo method.
Extra Question:
Create the classes according to the following UML diagram:
Create a bus object and create different seat objects for the bus. Assign id numbers from to to in sequential order.
Require user to reserve seat with id number. If id number is available then require name of the owner of the seat and reserve it Otherwise print an error message. To reserve the seat call makeReservation method, to delete the reservation call deleteReservation method.
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