Write a program using the class as defined

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

Write a program using` the class as defined below. Put the class definition in a separate header file, and put all the functions' code in a separate Resource file. Then write the main program in another file. that will read in some numbers and test out whether your functions all work.

As you can surmise from the names, the class has two constructors (test both of them), and it has two accessor functions (test both of them), and a function to calculate the perimeter of the quadrilateral. You can think of a quadrilateral as having at most only two distinct values for its sides (a rectangle, say). The friend function is to allow comparison of the perimeters of two quadrilaterals. Test out this function too. Keep the class definition as it is written here.

#include <iostream>

using namespace std;

class Quadrilateral
{
public:
Quadrilateral();
Quadrilateral(int sl, int s2);
void Perim();
int GetSide1();
int GetSide2();
friend char Compare(Quadrilateral shl, Quadrilateral sh2);
int p;
int sidel, side2;

After your program is debugged and you have checked the results by hand, send in three WordPad files having your three parts to the program.

Reference no: EM13315987

Questions Cloud

What is the persons acceleration : If a 60.0 kg person slides down an incline angled 25%u02DA below the horizontal and friction IS present with a coefficient of kinetic friction equal to k = 0.450. What is the person's acceleration
Compute the amount of manufacturing overhead : For Karr Company, the predetermined overhead rate is 140% of direct labor cost. During the month, Karr incurred $90,000 of factory labor costs, of which $80,000 is direct labor and $10,000 is indirect labor. Actual overhead incurred was $119,000.
Calculate what is the pressure at the siphon crown : The siphon crown is 1.2m above the water surface elevation of the reservoir and a length 10m away from the siphon entrance. If the siphon diameter is 30 cm, if the friction factor is .02, and the headless coefficient are .2 (inlet) and 1 (exit),
What is the magnitude of the resistive force : For a huge luxury liner to move with constant velocity, its engines need to supply a forward thrust of 7.05 105 N. What is the magnitude of the resistive force
Write a program using the class as defined : Write a program using` the class as defined below. Put the class definition in a separate header file, and put all the functions' code in a separate Resource file.
Explain a/some pattern/s of behaviour that you have observed : Select ONE of these lessons (principles), (the standard of living depends on a country's production)and explain a/some pattern/s of behaviour that you have observed in the media (newspapers, television, radio, Business Review Weekly, The Economist, e..
Find the mass of the stick using method of torques : We used a 100g mass hung from the 10 cm mark on a meter stick. find the mass of the stick using method of torques
How many weeks must pass before likelihood of lake water : A lake has a water level which is used to determine if watering restrictions need to be implemented for the neighboring city. Water levels are measured on a weekly basis, and restrictions are placed if the lake level drops below 1060 ft.
Explain how and why firms practice 3rd degree price : Explain how and why firms practice 3rd degree price discrimination. Use the handout to illustrate your answer (coupons; airlines, mobile phones).

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a graphical (not text-based) visual c++ program

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  Called cbankaccount

Create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount.

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Write a program that inputs a dollar amount to be printed

Write a program that inputs a dollar amount to be printed on a check and then prints the amount in check-protected format with leading asterisks if necessary

  Writing function that computes leap years

Write down function that computes leap years. Function prototype is as follows: Write function body which returns true if year is a leap year and false if year is not a leap year.

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  Implementation of sorting technique

Implementation of sorting technique

  Write a program that finds the equivalent series

Write a program that finds the equivalent series and parallel resistance for a collection of resistor values. Your program should scan first the number of resistors and then the resistor values. Then compute the equivalent series resistance for all r..

  This program will simulate the game of hearts

This program will simulate the game of Hearts, which is a four-player trick-taking game using any ordinary deck of playing cards. Each player is dealt thirteen cards. Whoever is dealt the Two of Clubs must lead it to the first trick. Each person p..

  Write a program that asks user to enter

Write a program that asks user to enter the size of the matrix (rows and column) then, it asks the user to enter the elements of two matrices and finally it adds two matrix and displays the result in C language.

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

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