Write a 10-15 line algorithm/pseudo-code that asks the user to input 2 numbers (called angle and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a 10-15 line algorithm/pseudo-code that asks the user to input 2 numbers (called angle and speed). The algorithm then simulates the firing of an arrow at that angle relative to the ground, at that launch speed (as in Figure 1). The algorithm then determines how far up the arrow goes, how far away the arrow lands, and how long it flies before landing. Then these 3 values are output to the screen. Include a check on the input data, and output an error message if the user provides a bad speed or angle. arrow angle Figure 1 ground Write a 10-15 line algorithm/pseudo-code that asks the user to input 2 numbers (called angle and speed). The algorithm then simulates the firing of an arrow at that angle relative to the ground, at that launch speed (as in Figure 1). The algorithm then determines how far up the arrow goes, how far away the arrow lands, and how long it flies before landing. Then these 3 values are output to the screen. Include a check on the input data, and output an error message if the user provides a bad speed or angle. arrow angle Figure 1 ground
Expert Answer:
Answer rating: 100% (QA)
function main angle speed getInput if isValidangle speed flightData simulateFlightangle speed displayResultsflightData else displayError function getInput angle getUserInputEnter angle in degrees 090 ... View the full answer
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
Explains briefly 1- What are the requirements and incentives in Puerto Rico for international and domestic trade 2- What are the advantages and disadvantages 3- includes references
-
Ivanhoe Company incurred research and development costs of $ 9 0 0 0 0 to develop a patent, and legal fees of $ 3 0 0 0 0 to register the patent. The patent has a legal life of 2 0 years and a useful...
-
You will design and implement your own data class. The class will store data that has been read as user input from the keyboard (see Getting Input below), and provide necessary operations. As the...
-
The current zero-coupon yield curve of semi-annually compounded rates for risk-free bonds is as follows: 1.0 Years 1.5 Years 2.0 Years 2.5 Years 3.0 Years 9.00% 10.20% 3.00% 4.00% 6.20% MATURITY 0.5...
-
1. What types of power and influence are organizations using when they require employees to sign over their creative rights to the company? Why are these tactics effective? 2. Do the results of the...
-
On April 30, the bank reconciliation of Perrin Company shows three outstanding checks: no. 254, $650; no. 255, $720; and no. 257, $410. The May bank statement and the May cash payments journal show...
-
Determine the slope at \(A\) of the 2014-T6 aluminum shaft having a diameter of \(100 \mathrm{~mm}\). A T 1 m C B 0.5 m 0.5 m 8 kN 8 kN 1 m
-
Find the interest rates, or rates of return, on each of the following: a. You borrow $700 and promise to pay back $749 at the end of 1 year. b. You lend $700 and receive a promise to be paid $749 at...
-
You are required to perform the following tasks: Select an ASX listed Australian company. For a full list of Australian companies please go to the website www.asx.com.au. Download your chosen...
-
Alice has invented a new card game to play with Bob. Alice made a deck of cards with random values between 1 and 52. Bob picks 5 cards. Then, he has to rearrange the cards so that by utilizing the...
-
How crucial is effective communication in business management and why is it considered a cornerstone for success in the corporate world?
-
Two companies, Boeing and Airbus, have long dominated the market for large commercial jet aircraft. Today Boeing planes account for 50% of the worlds fleet of commercial jet aircraft, and Airbus...
-
Established in 2000 as a joint venture between Verizon Communications and Britains Vodafone, over the last 18 years Verizon Wireless has emerged as the largest and consistently most profitable...
-
The U.S. newspaper business is a declining industry. Newspaper circulation has been steadily falling since 1990, with the drop accelerating in recent years. According to the Newspaper Association of...
-
In 1979, JCB, the large British manufacturer of construction equipment, entered into a joint venture with Escorts, an Indian engineering conglomerate, to manufacture backhoe loaders for sale in...
-
Founded in 1837, Cincinnati-based Procter & Gamble (P&G) has long been one of the worlds most international companies. Today, P&G is a global colossus in the consumer products business, with annual...
-
A medical equipment industry manufactures X-ray machines. The unit cost C (the cost in dollars to make each x-ray machine ) depends on the number of machines made. If x machines are made, then the...
-
(a) What is the focal length of a magnifying glass that gives an angular magnification of 8.0 when the image is at infinity? (b) How far must the object be from the lens?
-
The formula for converting a temperature from Fahrenheit to Celsius is Where F is the Fahrenheit temperature and C is the Celsius temperature. Write a method named Celsius that accepts a Fahrenheit...
-
When does the code in a finally block execute?
-
What classes do you use to write output to a binary file? What classes do you use to read from a binary file?
-
The W10 \(\times 15\) cantilever beam is made of A-36 steel and is subjected to the loading shown. Determine the slope and displacement at its end \(B\). A 3 kip/ft -6 ft -6 ft - B
-
The W14 \(\times 30\) cantilever beam is made of A-36 steel and is subjected to the loading shown. Determine the slope and displacement at its end \(B\). 2 kip/ft A 6 ft 6 ft. B 30 kip-ft
-
The W14 \(\times 43\) simply supported beam is made of A992 steel and is subjected to the loading shown. Determine the slope at \(A\) and \(B\). 60 kip ft A 12 ft- C 3 kip/ft 12 ft B
Study smarter with the SolutionInn App