Prepare a program in c++ using the class as defined

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

Program: Prepare a program in C++ 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 access or functions test both of them, and a function to evaluate 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.

Use this as your header files

#include <iostream>

using namespace std;

class Quadrilateral

{

Public:

          Quadrilatearl()

          Quadrilateral (int s1, int s2);

          void Perim();

          int GetSide1();

          int GetSide2();

          friend char Compare (Quadrilateral sh1, Quadrilateral sh2);

Private:

                 int p;

                 int side1, side2;

};

You have to use C++ language to evaluate the perimeter of the quadrilateral.

Reference no: EM13704472

Questions Cloud

Calculate c with various sets of values for a and b : Even if we were to declare variables a and b as integers, why might we still need to declare c as a ?double?
Will the direction and magnitude be integers or doubles : Define a Physics_vector class which consists of a struct containing the direction and magnitude, and also define a function
Subnetting and supernetting : What are the key differences between the following two terms: subnetting and supernetting? Provide examples for each - Do you expect IPv6 will replace IPv4 completely in the coming future
What is difference between colorname0 byte and db : What is the difference between ColorName0 BYTE "New is Blue ", 0 and ColorName0 db "New is Blue ",  0 ?
Prepare a program in c++ using the class as defined : Prepare a program in C++ using the class as defined below - Then write the main program in another file that will read in some numbers and test out whether your functions all work.
Write a recursive definition that reverses the elements : Write a recursive definition that reverses the elements in intArray between low and high.
Write and debug a mips program : Write and debug a MIPS program that performs the given operations - Display one of the following statements depending on if a>b, or a=b or a
Determines if the input string is a valid lock combination : Write a Java program that satisfies the given requirement - Prompts the user to input exactly nine characters, which constitute a valid lock combination.
Write a program that reads a list of integer : Write a program that reads a list of integer and stores the integers in an array and write a function compact that eliminates all zeroes from its array parameter

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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