subject
Computers and Technology, 18.05.2021 06:30 Day1201

All the shapes share some features for example each have some area and perimeter. Create a class Shape which will have 1 attribute dimensions (int). Square and rectangle are two derived
classes of Shape. Square class will have one attribute length (int) and rectangle will have length
(int) and width (int). Write following functions for each class:
οƒ˜ Constructor/Destructor
οƒ˜ Deep Copy Constructor
οƒ˜ Parameterized Constructor
οƒ˜ Getter/Setter for dimension and length/width
οƒ˜ Function to get the area of respective shape
οƒ˜ Function to write the shape information to data file in append mode.
οƒ˜ Write a main function to create dynamic array of square and rectangles.
οƒ˜ Also write a function to find the rectangle which will cost the least to paint. (Cost=area x
paint_cost, paint_cost can be any constant).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
question
Computers and Technology, 24.06.2019 20:20
Write python code that prompts the user to enter his or her age and assigns the user’s input to an integer variable named age.
Answers: 1
You know the right answer?
All the shapes share some features for example each have some area and perimeter. Create a class Sh...
Questions
question
Social Studies, 01.12.2021 01:10