Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Q1 Q2 When executed, your program should accept input as Dollars and Cents and should output the number of coins in each denomination totaling
Java
Q1
Q2
When executed, your program should accept input as Dollars and Cents and should output the number of coins in each denomination totaling up to the input amount. The program must output the optimum number of coins in each denomination. E.g. The optimum amount of change for one dollar will be four quarters. Input: Please enter your amount in dollars: 4 Please enter your amount in cents: 37 Output: 4 dollars and 37 cents are: 17 quarters, 1 dime, and 2 pennies When dropped from a height, in ideal conditions a free-falling object is expected to reach the maximum acceleration of 9.81m/s2. The object will accelerate while falling until it either reaches the ground or has attained its terminal velocity. Write a program that accepts two input values from the user: the initial position (height) in meters from where the object was dropped, and the observation time in seconds when. Your program will output the following values: 1. The distance in meters that the object has fallen to in the given time, e.g. it was dropped from 500 meters and has fallen 100 meters in 2 seconds 2. The distance of the object from the ground at the given time, e.g. having fallen 100 meters the distance from the ground now is 400 meters. The following equation should be used for your calculations: x(t)=0.5at2+vit+xi where: x (t) is the position of the object at a given time. This is one of the outputs values you are looking to calculate a is the acceleration of the object, which should always be 9.81m/s2 t is the time taken as input from the user vi is initial velocity, which should always be zero since the object was dropped from a resting position x1 is the initial position, or height, taken as input from the user Input (Example): Enter height in meters: 400 Time in scconds: 3 Output (Example): After being dropped from 400 meters, the object fell 150 meters in 3 seconds. The distance from the ground at the time was 250 metersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started