Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fix this program please. (C++ code) #include ccc_win.h class Chutist { public: // default; Chutist() { Point loc = Point(1250,1000); } // constructor of Chutist

Fix this program please. (C++ code)

#include "ccc_win.h" class Chutist { public: // default; Chutist() { Point loc = Point(1250,1000); } // constructor of Chutist object at Point loc; Chutist(Point loc) { // code here double he_x = loc.get_x(); double he_y = loc.get_y(); } // accessor function: displays the chutist at location to the cwin void move(int dx, int dy) { a.move(dx,dy); b.move(dx,dy); c.move(dx,dy); d.move(dx,dy); } void display(bool chute) const { // displays the chutist at the Point location.If i is negative the chute is closed. If i is positive, it is open. if (chute == true){// chute if open cwin << Line(a,b); cwin << Line(b,c); cwin << Line(c,a); cwin << Message(Point(100,100), "Landing Success"); } else {// chute is closed cwin << Chutist(Point); } } private: Point loc;// location of chutist Point a;// These points -a,b,&c- are the Point b;// points used to generate the parachute Point c;// when active. Point d;// This is probably going to be the chutist IDK. }; // the main program that will create the output display int ccc_win_main() { // Speed of drop double vel_y = 0; double vel_x = 0; double flight = 1250; // Parachute int secondstoopen = 0; bool chute = false; // spawns window and ball cwin.coord(0,1250,1250,0); Circle cball = Chutist(Point loc, 10); cball.display(); Triangle brake = Chute(Point(0,0),Point(2,4),Point(4,0)); brake.display(); // this does the speed and fall calculations while (height > 0) { vel_y += 32; vel_x += 16; if (vel_y > 174) { vel_y = 174; } if (secondstoopen >= 5) { vel_y -= 100; vel_x -= 10; if (vel_y < 17){ vel_y = 17; vel_x = 0; chute = true; cwin << Message(Point(300,100), "Landing Velocity:", y_velocity); } } he_y -= vel_y; he_x -= vel_x; // updates the window and graphics of ball dropping cball.move(he_x,-he_y); cball.display(); brake.move(he_x,-he_y); brake.display(chute); ++secondstoopen; } return 0; } 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago