This lab test describes the implementation of the base class, Rectangle and Its derived class, Parallelogram. Create a p

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

This lab test describes the implementation of the base class, Rectangle and Its derived class, Parallelogram. Create a p

Post by answerhappygod »

This Lab Test Describes The Implementation Of The Base Class Rectangle And Its Derived Class Parallelogram Create A P 1
This Lab Test Describes The Implementation Of The Base Class Rectangle And Its Derived Class Parallelogram Create A P 1 (59.81 KiB) Viewed 14 times
This lab test describes the implementation of the base class, Rectangle and Its derived class, Parallelogram. Create a program that includes: a. Rectangle.h b. Rectangle.cpp C. Parallelogram.h d. Parallelogram.cpp e. MainProg.cpp - main program . i) Rectangle.h includes the declaration of class Rectangle that have the following: Attributes: Both height and width of type double. Behaviours: Constructor will initialise the value of height and width to 0. Destructor setData() set the value of height and width; given from user through parameters. . calcArea () - calculate and return the area of the Rectangle. • calcPerimeter() - calculate and return the perimeter of the Rectangle. 3 ii) Rectangle.cpp includes all the implementation of class Rectangle. iii) Parallelogram.h includes the declaration of class Parallelogram that will use the attributes and behaviours from class Rectangle. iv) Parallelogram.cpp includes the implementation of class Parallelogram. v) MainProg.cpp should accept height and width values and then show the area and the perimeter of the parallelogram shape.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply