Create a base shape class

Assignment Help C/C++ Programming
Reference no: EM131102953

TITLE

- Development and Implementation of Shape Class

OBJECTIVE

- To test students' capabilities of understanding on object oriented programming (OOP) in C++.
- To implement OOP in developing shape classes and use them to draw (print) objects.

- To improve students' imagination by giving space of creativity.

ASSIGNMENT DESCRIPTION

You are required to create shape classes and use them to build an application in text mode console (not graphic mode).

TASK 1

In first task, you are required to create a base Shape class and its successor a Rectangle elassids The base class is called Shape class. The Shape class has few methods and attributes.

shows the minimum methods and attributes that the class should have. Student can (or should) add more methods and attributes to make the class works. Student can modify methods and attributes name.

Rectangle class is the inheritance of Shape class. Rectangle class can access to all (or some) methods and attributes of Shape class. To determine which methods and attributes derived from the base class, student has to understand the concept of inheritance and encapsulation.

For example, a rectangle is formed of four lines. Therefore, Rectangle class must have ability to print lines. In the other hand, when draw method in Rectangle class is called, Rectangle class calls line methods of Shape class (not creating own methods).

Reference no: EM131102953

Questions Cloud

Stamps of two denominations : If Sabrina spent $17.94 for a total of 54 stamps of these two denominations, how many stamps of each denomination did she buy?
What was last year''s dividend per share : After a 5-for-1 stock split, the Strasburg Company paid a dividend of $0.75 per new share, which represents a 9 percent increase over last year's pre-split dividend. What was last year's dividend per share?
Total annual interest earned : An actor invests some money at 7%, and $41000 more than twice the amount at 12%. The total annual interest earned from the investment is $38400.
Crane to unload this ship : Two cranes can unload a ship together in 6 hours. The faster crane takes 5 hours less than the slower crane, if each were to unload the same ship alone. How long does it take for each crane to unload this ship?
Create a base shape class : Create a base Shape class and its successor a Rectangle elassids The base class is called Shape class. The Shape class has few methods and attributes.
Determining scope of the literature review is daunting task : The literature review must communicate the foundations of knowledge that underlie the research without becoming redundant (Abramson, 2015). Abramson (2015) suggest that the researcher will know how to conclude his search, when the readings no long..
Initial gift needs to be in order for the reciepient : How far would you have to go to receive $10,000. How would you determine how much the initial gift needs to be in order for the reciepient to recieve $10,000
Why is a margin of error necessary : Why is a margin of error necessary? That is, why do the polls not simply report that 49% approve of the job President Obama is doing? What causes the uncertainty that makes such a margin of error necessary
Determine the bandwidth of the modulator output : Determine the bandwidth of the modulator output if a power ratio, Pr, of 0.8 is needed. Repeat for a power ratio of 0.9.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a value-returning function

Write a program that uses the function isNumPalindrome given(Palindrome Number). Test your program on the following numbers: 10, 34, 22, 333, 678, 67876, 44444, and 123454321.

  Explain how to represent a lagged fibonacci generator

Explain how to represent a lagged Fibonacci generator using list abstract data types. What representation would be the most appropriate?

  Show the contents of the id array

Show the contents of the id array after each union operation when you use the quick find algorithm (Program below) to solve the connectivity problem for the sequence 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3.

  Choice lists of the case statement

In Ada, the choice lists of the case statement must be exhaustive, so that there can be no unrepresented values in the control expression. In C++,

  Write a program that calculatesand displays the distance

Distance per Tank of GasA car with a 20-gallon gas tank averages 21.5 miles per gallon when driven in townand 26.8 miles per gallon when driven on the highway.

  Write a program for a palindrome

Write a program for A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindromes with minimum number of character replacements..

  Fill up the tables

Fill up the tables and show ALL the steps required to solve each problem below. You must convert the entire IP address to binary.

  Provide an avenue for users to enter test data

Suggest an application system which is able to perform some arithmetic computations, like commission system, encryption system, timer system, etc, from anyone of the following industry.

  Write a recursive void function

Write a recursive void function called rot at eLeft that rotates the first n integers in an array to the left. To rotate n items left, rotate the first n - 1 items left recursively, and then exchange the last two items. For example, to rotate the ..

  Take an n x n matrix, and create a new, (n-1) x (n- 1)

take an N x N matrix, and create a new, (N-1) x (N- 1), matrix with each element being the sum of four nearby elements. You need to figure out a way to break the matrix up into squares and iterate through the matrix, while staying within its bounds.

  Relationship between obesity and food consumption

Researcher states that there is relationship between obesity and food consumption. Obesity is the condition of excess body fat and it can get diabetes, heart disease, high blood pressure and also fatal. People in the US getting obese because of the l..

  Allows its salesclerks to enter the length and width

a program that allows its salesclerks to enter the length and width (both in feet) of a rectangle and the price of a square foot of tile. The program should calculate and display the area of the rectangle and the total price of the tile.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd