subject

Given class Triangle (in files Triangle. h and Triangle. cpp), complete main() to read and set the base and height of triangle1 and of triangle2, determine which triangle's area is larger, and output that triangle's info, making use of Triangle's relevant member functions. Ex: If the input is:
3.0 4.0
4.0 5.0
where 3.0 is triangle1's base, 4.0 is triangle1's height, 4.0 is triangle2's base, and 5.0 is triangle2's height, the output is:
Triangle with larger area:
Base: 4.00
Height: 5.00
Area: 10.00
GIVEN (in main. cpp):
#include
#include "Triangle. h"
using namespace std;
int main(int argc, const char* argv[]) {
Triangle triangle1;
Triangle triangle2;
// TODO: Read and set base and height for triangle1 (use SetBase() and SetHeight())
// TODO: Read and set base and height for triangle2 (use SetBase() and SetHeight())
// TODO: Determine larger triangle (use GetArea())
cout << "Triangle with larger area:" << endl;
// TODO: Output larger triangle's info (use PrintInfo())
return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
question
Computers and Technology, 22.06.2019 05:30
The total revenues for a company are $150,223 and the total expenses were 125,766. if you are calculating the net income, which of these spreadsheets would you use? insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2-b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2+b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2/b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2*b3. the formula should be showing in the formula bar.
Answers: 3
question
Computers and Technology, 22.06.2019 10:00
Wich technology can a website use to allow you to listen to a concert live over the internet?
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
You know the right answer?
Given class Triangle (in files Triangle. h and Triangle. cpp), complete main() to read and set the b...
Questions
question
Mathematics, 01.10.2019 19:00
question
English, 01.10.2019 19:00
question
Computers and Technology, 01.10.2019 19:00
question
Mathematics, 01.10.2019 19:00
question
French, 01.10.2019 19:00
Questions on the website: 13722362