Question: C++ program Section C Scenario-Based Question(s) 40 Marks Study the scenario and complete the question(s) that follow: Object Oriented programming Object oriented programming is a

 C++ program Section C Scenario-Based Question(s) 40 Marks Study the scenario

C++ program

Section C Scenario-Based Question(s) 40 Marks Study the scenario and complete the question(s) that follow: Object Oriented programming Object oriented programming is a paradigm that is centred on objects rather than functions. In other world real world objects are represented with codes. Most important concepts of OOP are classes and objects. Bonyongwa T (2020) Question 3 Applying one of the concepts of OOP, classes, create a rectangle class Rectangle with a method void() to capture the length and the width of the rectangle. The method should check that all of the dimensions are greater than 0.0 before assigning the values to the private data members. The class also should include two value-returning method should calculate the area of rectangle, and the other should calculate the perimeter of the rectangle. The formula for calculating the area a triangle is length * width. The formula for calculating the perimeter of a rectangle is (length + width) *2. The program should have appropriate variables in the class and a default constructor. (40 Marks) End of Section C ITCPB11-S11 - Initial Online Assessment Paper 2021 V1.0 Page 6 of 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!