Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE : Each question is 5 marks. Q 1: Create a class called (Rectangle) and an object of this class called (rect). This class contains

image text in transcribed

NOTE : Each question is 5 marks. Q 1: Create a class called (Rectangle) and an object of this class called (rect). This class contains two data members of type integer ( width and height ) with private access and two member functions with public access: set_values() and area(). Write a program to set and display the object fields. Q 2: Answer ONE of the following ? A:/Write a program using functions (addition and cube) to calculate the equation : Z= addition( x,y) + cube(x). Then, print the final result of Z ? B:/ Class called ( myclass ) and an objects of this class called (objl) and (obj2). This class contains two data members of type integer ( a and b) with private access, and three member functions with public access: constructor to give value to variables ,and default constructor and show() to display variables. Write a program to set and display the objects fields

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago