Question

C++ HELP!!! In Visual Studio Open the program - OOP Sample 1: => [ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") =...

C++ HELP!!! In Visual Studio

Open the program - OOP Sample 1: =>

[

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OOP Sample 1", "OOP Sample 1\OOP Sample 1.vcxproj", "{5AA0D223-D7DB-4363-BA31-2A188B5E6D96}"

EndProject

Global

              GlobalSection(SolutionConfigurationPlatforms) = preSolution

                             Debug|x64 = Debug|x64

                             Debug|x86 = Debug|x86

                             Release|x64 = Release|x64

                             Release|x86 = Release|x86

              EndGlobalSection

              GlobalSection(ProjectConfigurationPlatforms) = postSolution

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Debug|x64.ActiveCfg = Debug|x64

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Debug|x64.Build.0 = Debug|x64

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Debug|x86.ActiveCfg = Debug|Win32

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Debug|x86.Build.0 = Debug|Win32

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Release|x64.ActiveCfg = Release|x64

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Release|x64.Build.0 = Release|x64

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Release|x86.ActiveCfg = Release|Win32

                             {5AA0D223-D7DB-4363-BA31-2A188B5E6D96}.Release|x86.Build.0 = Release|Win32

              EndGlobalSection

              GlobalSection(SolutionProperties) = preSolution

                             HideSolutionNode = FALSE

              EndGlobalSection

EndGlobal

]

1. At the top of the program put these following comments:

//Your Name:

//Class: Css 222-41

//Assignment - Practice Program

//Purpose - Compute area, perimeter and diagonal of a rectangle

2. Add a member function - getPerimeter() that computes the perimeter of the rectangle.

formula:  perimeter = 2 * (length + width)

3. Make necessary changes in the header file to declare the member function getPerimeter.

4. Add this in driver program:

cout << "Peremeter: " << box.getPerimeter() << endl;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

execute as :

g++ main.cpp rectangle.cpp

run as :

./a.out

1. Save the above file as main.cpp

2. Save the above file as rectangle.h

3. Save the above file as rectangle.cpp

And execute!

Add a comment
Know the answer?
Add Answer to:
C++ HELP!!! In Visual Studio Open the program - OOP Sample 1: => [ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ program. int main() {    Rectangle box;     // Define an instance of the Rectangle class...

    C++ program. int main() {    Rectangle box;     // Define an instance of the Rectangle class    double rectWidth; // Local variable for width    double rectLength; // Local variable for length    string rectColor;    // Get the rectangle's width and length from the user.    cout << "This program will calculate the area of a\n";    cout << "rectangle. What is the width? ";    cin >> rectWidth;    cout << "What is the length? ";    cin >>...

  • PLEASE DO IN C# AND MAKE SURE I CAN COPY CODE IN VISUAL STUDIO Exercise #1:...

    PLEASE DO IN C# AND MAKE SURE I CAN COPY CODE IN VISUAL STUDIO Exercise #1: Design and implement class Rectangle to represent a rectangle object. The class defines the following attributes (variables) and methods: 1. Two Class variables of type double named height and width to represent the height and width of the rectangle. Set their default values to 1.0 in the default constructor. 2. A non-argument constructor method to create a default rectangle. 3. Another constructor method to...

  • Create a C++ Console project called Lab3a and add the following source document rect_struct.cpp to the...

    Create a C++ Console project called Lab3a and add the following source document rect_struct.cpp to the project. #include <iostream> #include <iomanip> using namespace std; // This program uses a structure to hold data about a rectangle // PLACE YOUR NAME HERE // Fill in code to declare a structure named rectangle which has // members length, width, area, and perimeter all of which are floats int main() {        // Fill in code to define a rectangle variable named box...

  • THIS IS FOR C++ PROGRAMMING USING VISUAL STUDIO THE PROGRAM NEEDS TO BE IN C++ PROGRAMMING #inclu...

    THIS IS FOR C++ PROGRAMMING USING VISUAL STUDIO THE PROGRAM NEEDS TO BE IN C++ PROGRAMMING #include "pch.h" #include #include using namespace std; // Function prototype void displayMessage(void); void totalFees(void); double calculateFees(int); double calculateFees(int bags) {    return bags * 30.0; } void displayMessage(void) {    cout << "This program calculates the total amount of checked bag fees." << endl; } void totalFees() {    double bags = 0;    cout << "Enter the amount of checked bags you have." << endl;    cout <<...

  • Done in C++ using visual studio 1. Write a program with one additional function called int[]...

    Done in C++ using visual studio 1. Write a program with one additional function called int[] reverseArray(int array). This function will receive an array from main and then reverse and should return the reversed array to the main to print out. Use a single array and a single loop, you’re are neither allowed to print out just in reverse order nor allowed to use another array variable to store the original array in reverse order. 2. Write a program which...

  • Can someone help me . This program needs to run in visual studio and written in...

    Can someone help me . This program needs to run in visual studio and written in c++. I want to call to the function string eraseChar in the main function to use the variables str and ch. I cannot use global variables. #include<iostream> #include <string> using namespace std; string eraseChar(char ch = 'e', string str = "the bike fell in the water");    int main() {    int pos;    pos = str.find(ch);    while (pos != string::npos)    {...

  • Using the Windows Starter Visual Studio project create the following two programs. 1. Write a program...

    Using the Windows Starter Visual Studio project create the following two programs. 1. Write a program that will loop three times and raise the number 25 to the third power (25pts). (25*25*25) Note: Make sure you have a large enough memory for the final number 2. Write a program using a whileSum that adds one to the index until it is five (25pts). Sample:         mov sum, 0     ; sum := 0         mov ecx, 1     ; count := 1 whileA:...

  • This is a C++ Program I created in Visual Studio for class. The problem I am...

    This is a C++ Program I created in Visual Studio for class. The problem I am having is I get an error msg that says, "no matching token found for line 8." What am I missing? I see an opening bracket and a closing bracket. But, the program will not build because it says more or less the bracket is missing. FYI....Line 8, is the bracket directly under int main (). Can someone help me understand where I am going...

  • My C++ program is not compiling. Please explain how you fixed with detailed inline comments. I am using Visual Studio 2017. It's a character count program that keeps and displays a count of all th...

    My C++ program is not compiling. Please explain how you fixed with detailed inline comments. I am using Visual Studio 2017. It's a character count program that keeps and displays a count of all the upper, lower case and digits in a .txt file. The requirement is to use classes to implement it. -----------------------------------------------------------------HEADER FILE - Text.h--------------------------------------------------------------------------------------------- /* Header file contains only the class declarations and method prototypes. Comple class definitions will be in the class file.*/ #ifndef TEXT_H #define...

  • Problem with C++ program. Visual Studio say when I try to debug "Run-Time Check Failure #2...

    Problem with C++ program. Visual Studio say when I try to debug "Run-Time Check Failure #2 - Stack around the variable 'string4b' was corrupted. I need some help because if the arrays for string4a and string4b have different sizes. Also if I put different sizes in string3a and string4b it will say that those arrays for 3a and 3b are corrupted. But for the assigment I need to put arrays of different sizes so that they can do their work...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT