Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1: Kinetic Energy In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to

Task 1: Kinetic Energy

In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving objects kinetic energy:

image text in transcribedKE=12mv2 The variables in the formula are as follows: KE is the kinetic energy, m is the objects mass in kilograms, and v is the objects velocity, in meters per second. Design a function named kineticEnergy that accepts an objects mass (in kilograms) and velocity (in meters per second) as arguments. The function should return the amount of kinetic energy that the object has. Design a program that asks the user to enter values for mass and velocity, and then calls the kineticEnergy function to get the objects kinetic energy.

Task 2: Wood Trim, Inc.

Wood Trim, Inc. wants a program that will allow its sales clerks to enter the length (in feet) of the trim ordered by a customer and calculate the total price of the trim after the 5% sales tax is added. Assume the unit price is $16.50/foot no exceptions. Design and write pseudocode for an application program, creating functions with/without parameters and calling the function to accomplish the task.

The application program contains a main() function, a getInput() function, a calculate() function, and a print() function. The main() will call the getInput() function which will gather the user input (the length in feet of the trim) from the user, then return the value back to main(); The main() will then call the calculate() function passing the correct argument(s) for processing. The calculate() function will calculate the cost, then return the result (the total including tax) to main(). The main() will call the print() function to print out the final results.

Create IPO charts: Create an IPO chart for each function, indicating steps to solve the problem (Processing), identify data in and out by listing them in the correct sections (Input or Output), and local variables to be declared for the function.

Write pseudocode for the application. Be sure to use Javadoc, section and line comments for documentation, use named constants (for the sales tax and a constant for the unit price, etc.) wherever applicable, follow name conventions and pseudocode keywords, apply good programming styles.

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

More Books

Students also viewed these Databases questions

Question

5. Identify the essential functions of a job.

Answered: 1 week ago