VISION is a world leader in manufacturing LCD Televisions. The company has decided that it will allow its customers to give the dimensions of the TV (in length and width). Once the length and width are ordered the company will manufacture the TV according to your requirements. In this regard they want you to create a program that will assist them. Carefully read all the instructions and follow the requirements. --Create a class called vision -- Create three constructors as follows: -- A Default constructor that calls the setlength( ) and setwidth( ) function. -- A parameterized constructor that will receive the length and width as integers -- A parameterized constructor that will receive the length and width in float -- By using a special function calculate the area of the TV -- Create a function to calculate the price of the TV by multiplying the area with Rs. 65. -- Create a display( ) function to show the details of the purchased TV. In the main you will construct three objects that demonstrate the use of the three constructors. After calling the constructor it will take over and will handover control to the area function, and then the price calculation function.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
VISION is a world leader in manufacturing LCD Televisions. The company has decided that it will allow its
customers to give the dimensions of the TV (in length and width). Once the length and width are ordered the
company will manufacture the TV according to your requirements. In this regard they want you to create a program
that will assist them. Carefully read all the instructions and follow the requirements.
--Create a class called vision
-- Create three constructors as follows:
-- A Default constructor that calls the setlength( ) and setwidth( ) function.
-- A parameterized constructor that will receive the length and width as integers
-- A parameterized constructor that will receive the length and width in float
-- By using a special function calculate the area of the TV
-- Create a function to calculate the price of the TV by multiplying the area with Rs. 65.
-- Create a display( ) function to show the details of the purchased TV.
In the main you will construct three objects that demonstrate the use of the three constructors. After calling the
constructor it will take over and will handover control to the area function, and then the price calculation function.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images