Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) The cover page 2) The source listing 3) A screen shot of program execution. Thanks! P5.12 Write functions double distance (double x1, double x2,

image text in transcribedimage text in transcribedimage text in transcribed

1) The cover page 2) The source listing 3) A screen shot of program execution. Thanks! P5.12 Write functions double distance (double x1, double x2, double yi, double y2) void midpoint (double x1, double x2, double yi, double y2, double& xmid, double& ymid) void slope(double xl, double x2, double y1, double y2, bool& vertical, double& s) that compute the distance, midpoint, and slope of the line segment joining the points (x1,71) and (x2, Y2). The slope function should either set vertical to true and not set s, or set vertical to false and set s to the slope. Requirements: Please work on P5.13 on page 239. If the input value is invalid, prompt the user to re-enter. Output - your program should print the (new salary) based on the total amount of the raise and original salary. Test Cases: Please use the following test cases to test your program. Case 1: Salary: -$50,000 (Your program should generate an error message and stop processing) Percentage raise: 20% (.20) Message: "Do you want to continue (v)?" Case 2: Salary: $50,000 Percentage raise: - 20% (-.20) (Your program should generate an error message and stop processing) Message: "Do you want to continue (y)?" Case 3: Salary: $50,000 Percentage raise: 20% (20) Message: "Do you want to continue (y)?" Case 4:n send a message: "Exit!" Due date: January 31, 2022 Submission includes

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

What are the five forces that determine an industrys profitability?

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago