Create a pogram that uses inheritance

Assignment Help Basic Computer Science
Reference no: EM13307716

Create a pogram that uses inheritance. You will have a base class called Polygon which contains width and height. There will be two classes that inherit from this base class-rectangle and triangle. These two classes will have two member functions-1) calculate area and 2) show area. The base case will be able to show width and height. Remember to have constructors for the classes. Use the rand() function to generate the values for length and width. Have the values be between 1 and 10 to represent inches. The values you generate should be floating points and allow for decimal points. to perform this task you should generate random numbers between 200 and 1000 and then divide by 100 to generate the decimal points.

Reference no: EM13307716

Questions Cloud

Create a simple program that manipulates vectors : Create a simple program that manipulates vectors as follows.
Psychological factors in risk management : Could you share with us any psychological factors you have come across in risk management on an infrastructure project (or any other project)?
Defining the activities in every instance : Determine the need to develop the WBS before defining the activities in every instance. In the given scenario, think of the different types of dependencies within the project. In your opinion, how do the activity dependencies impact the project durat..
What are the rms values of the electric and magnetic fields : A future space station in orbit about the earth is being powered by an electromagnetic beam from the earth. What are the rms values of the electric and magnetic fields
Create a pogram that uses inheritance : The values you generate should be floating points and allow for decimal points. to perform this task you should generate random numbers between 200 and 1000 and then divide by 100 to generate the decimal points.
Calculate the ph of a drop of pure rainwater at a temp : . In order to get full credit for this problem you must list all unknown species that would exist in the raindrop and all pertinent equations regardless of their level of significance. You must algebraically solve the equations to determine pH.
Determines whether the number is even or odd : The numbers should be generated using the rand() function. Use a while loop to list out the values using the pointer array.
Compute the coordinates of the center of mass : Three balls with masses of 3.0 kg, 1.0 kg, and 5.0 kg are located at coordinates (8.0m,8.5m), (8.5m,4.5m), and (4.5m,1.0m), What is the x-coordinate of the center of mass
Compute the maximum torque that this coil can experience : A wire has a length of 6.63 Ã- 10-2 m and is used to make a circular coil of one turn. compute the maximum torque that this coil can experience

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Various standards organizations utilized in this industry

Discuss the various standards organizations utilized in this industry. Do they have conflicting charters or have they worked in different areas to form a coordinated industry overview?

  Use active directory for authentication and authorization

Why would an organization choose to use Active Directory for authentication and authorization over other solutions such as Novell Netware or a free solution such as Linux based LDAP.

  What is the difference between cdma and lte

What is the difference between CDMA and LTE? Is one technology better than the other?

  What is the number of juggling patterns of length

a. What is the number of juggling patterns of length 2 using at most 3 balls? b. Write the stack numbers for the patterns of part (a). c Write the tables for these juggling patterns.

  Drawing crow-s foot erd using a specialization hierarchy

Given the following business scenario, create a Crow's Foot ERD using a specialization hierarchy if appropriate.

  Function drawlinegraph that generates a line graph

Write a function DrawLineGraph that generates a line graph given an array of x-coordinate values, a second array of corresponding y-coordinate values, and the number of data points.

  Declare a deque container

Declare a deque container. Using keyboard to input several floating point numbers, say at least five floating point numbers; find the median number and display the result.

  How many units of each component ordered from each supplier

If the Edwards production plan for the next period includes 1000 units of component 1 and 800 units of component 2, how many units of each component (C1, C2) should be ordered from each supplier (S1, S2, S3)?

  The mode of a list of values is the score

For this project you will write a program to compute the arithmetic mean (average), median, and mode for the values read in from TopicFin.txt. The program results will be written to TopicFout.txt.

  What is meant by artificial intelligence

What is meant by artificial intelligence? What are two essential differences between human brains and the central processing unit of a computer.

  Test pseudocode by creating test plans and desk checks

Write down pseudocode for main menu. Write pseudocode for options, only code to navigate menu is required. Sketch flowchart for a main menu.

  How dui charges of domestic violence and influence career

Sensitive information and may end up in court as technical or expert witness. How can things like a DUI, charges of domestic violence and other items influence your career?

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