1. An express bus company has trips from Kuala Lumpur to six cities in Malaysia. The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. An express bus company has trips from Kuala Lumpur to six cities in Malaysia. The cities are referred to by number, 1 to 6. The price for a trip to each of the cities is as follows: City Price (RM) 1 2 56.80 105.70 3 93.50 4 155.00 5 6 87.50 73.00 Write a program that can compute the total price of tickets that a customer orders. The program should prompt the user for the destination city number and the number of tickets desired. If the user enters an invalid city number, the program should display an error message and repeat asking the city number until a valid input is entered. Finally, the program should display the total price of the tickets ordered. You must use a one- dimensional array to store the ticket price table. Name of program file to be submitted: Asg31.java 1. An express bus company has trips from Kuala Lumpur to six cities in Malaysia. The cities are referred to by number, 1 to 6. The price for a trip to each of the cities is as follows: City Price (RM) 1 2 56.80 105.70 3 93.50 4 155.00 5 6 87.50 73.00 Write a program that can compute the total price of tickets that a customer orders. The program should prompt the user for the destination city number and the number of tickets desired. If the user enters an invalid city number, the program should display an error message and repeat asking the city number until a valid input is entered. Finally, the program should display the total price of the tickets ordered. You must use a one- dimensional array to store the ticket price table. Name of program file to be submitted: Asg31.java
Expert Answer:
Answer rating: 100% (QA)
import javautilScanner public class Asg31 public static void mainString args Array to store ticket p... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Governmental Funds Statement of Revenues Expenditures and Changes in Fund Balance. You have recently started working as the controller for a small county. The county is preparing its financial...
-
Gallup conducted a survey in April 1 to 25, 2010, to determine the congressional vote preference of the American voters. They found that 51% of the male voters preferred a Republican candidate to a...
-
Fitness Fanatics is a regional chain of health clubs. The managers of the clubs, who have authority to make investments as needed, are evaluated based largely on return on investment (ROI). The...
-
The 60 mm x 60 mm oak post is supported on the pine block. If the allowable bearing stresses for these materials are oak = 43 MPa and pine 25 MPa, determine the greatest load P that can be...
-
eSupplies Corporation began operations on January 1, 2011, as an online retailer of computer software and hardware. The following financial statement data were taken from eSupplies records at the end...
-
If individual values that underline ethics are developed at a young age, what might this suggest about the potential for ethical conflicts to arise within an organization?
-
Suppose you run a convertibles arbitrage hedge fund. You've noticed a potential trading opportunity related to the different securities issued by ENM Corporation. In particular, you think there may...
-
what extent does the reciprocal exchange of feedback and constructive critique within the mentorship dyad serve as a catalyst for personal and professional metamorphosis, engendering a culture of...
-
Mando Enterprises is expected to pay a dividend of $2.50 a year from today. Annual dividends are expected to grow by 10% in year 2, by 7% in year 3, and thereafter by 4.50% per year. Stockholders...
-
A girl delivering newspapers covers her route by traveling 8.70 blocks north, 2.18 blocks south, and 9.93 blocks east. Find the angle (a positive value in , between 0 and 360) of her resultant...
-
Dr. Wong is an equity portfolio manager with two new clients: The Hong Kong University Endowment Fund and the Tung Wah Group Foundation. The Hong Kong University Endowment Fund (the Fund) is overseen...
-
Havana Hats makes the world's best hats. Information for the last eight months follows: Number of Hats Month January Produced Total Cost 1,800 $ 9,000 February 4,890 15,648 March 2,300 10,350 April...
-
Write a paper in which you: 1. Identify the chosen law and evaluate its impact on society in the U.S. and / or global environment. 2. Describe the penalties and fines that exist for offenders of the...
-
A number of years ago the United Food and Commercial Workers Union organized 800 workers of the 1035 employees at one of the Wilson Brothers food operations in Toronto, Ontario. The employees include...
-
Assume that you have shorted the put option in Problem 4. a. If the stock is trading at \($8\) in three months, what will you owe? b. If the stock is trading at \($23\) in three months, what will you...
-
Assume that you have shorted the call option in Problem 2. PROBLEM 2 You own a call option on Intuit stock with a strike price of \($40.\) The option will expire in exactly three months. a. If the...
-
Redo Problem 14, but assume that Kay must pay a corporate tax rate of 21%, and that investors pay no taxes. Problem 14. Chen Brothers, Inc., sold 4 million shares in its IPO, at a price of \($18.50\)...
Study smarter with the SolutionInn App