Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

What is American Polity and Governance ?

Answered: 1 week ago

Question

Question Can a Keogh plan fund be reached by the owners creditors?

Answered: 1 week ago

Question

Question What happens to my plan if I die?

Answered: 1 week ago