Write a Java Program for following:- 14 Shasha Travels Pvt. Ltd. gives the following discount to its
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Java Program for following:-
Transcribed Image Text:
14 Shasha Travels Pvt. Ltd. gives the following discount to its customers: Ticket Amount Discount Above Rs. 70000 18% Rs. 55001 to Rs. 70000 16% Rs. 35001 to Rs. 55000 12% Rs. 25001 to Rs. 35000 10% Less than Rs. 25001 2% Write a program to input the name and ticket amount for the customer and calculate and return the discount amount from in the function double calculate(int a) where a is ticket amount. Calculate net amount and display the output in the following format for each customer: Name Ticket Charges Discount Net Amount 14 Shasha Travels Pvt. Ltd. gives the following discount to its customers: Ticket Amount Discount Above Rs. 70000 18% Rs. 55001 to Rs. 70000 16% Rs. 35001 to Rs. 55000 12% Rs. 25001 to Rs. 35000 10% Less than Rs. 25001 2% Write a program to input the name and ticket amount for the customer and calculate and return the discount amount from in the function double calculate(int a) where a is ticket amount. Calculate net amount and display the output in the following format for each customer: Name Ticket Charges Discount Net Amount
Expert Answer:
Answer rating: 100% (QA)
import javautilScanner public class TicketCalculateMain Function to calculate d... View the full answer
Posted Date:
Students also viewed these programming questions
-
Write a Java program for a restaurant with the following features: Customer: Name, Surname, ID (incremental ID by 1 for each new customer), Email, Phone, Address. Service: ID (incremental ID by1...
-
Write a java program for overloaded function calculate() with following function definitions. void calculate(int x, int y ) to calculate the sum of all even numbers from x till y and print the sum ....
-
Write a Java program that simulates car racing, as shown in Figure 16.22(a). The car moves from left to right. When it hits the right end, it restarts from the left and continues the same process....
-
Mount Everest is Earth's highest mountain above sea level, located in the Mahalangur Himal sub-range of the Himalayas. The ChinaNepal border runs across its summit point. Its elevation of 8,848.86 m...
-
According to a recent report, 32.2% of American adults (aged 20 and older) are obese (New York Times, August 15, 2008). Among ethnic groups in general, African-American women are more overweight than...
-
A heat pump is used to heat a building. The outside temperature is -5.0'C, and the temperature inside the building is to be maintained at 22oC. The pump's coefficient of performance is 3.8, and the...
-
Do you think that private foundations should encourage and be allowed to fund lobbying activities? Why or why not?
-
Melissa Crupp is the new manager of the materials storeroom for Canton Manufacturing. Melissa has been asked to estimate future monthly purchase costs for part #4599, used in two of Canton's...
-
You are interested in investing some money and are presented with the following two investment options: Option A: Earn an effective interest rate of 9 . 7 5 % per annum; Option B: Earn a nominal...
-
It took a long time but the Securities and Exchange Commission finally acted and held auditors responsible for the fraud that occurred in banks during the financial recession. Surprisingly to some,...
-
After more than a decade of counterinsurgency operations in Iraq and Afghanistan, what is the future role of the Marine Corps in irregular warfare?
-
Current Attempt in Progress Cullumber Company issued $840,000, 996, 10-year bonds on December 31, 2021, for $770,000. Interest is payable annually on December 31. Cullumber Company uses the...
-
For the dam shown in Figure 4 a). Draw the flow net. Use four flow channels. b). Compute the flow rate under the dam per meter width if the coefficient of permeability is 8 x 10-4 cm/s. c). d). DII !...
-
The Crammond Manufacturing Plc has a number of factories around the country and it needs to upgrade the water purification systems in its factories. The company is looking at two possible systems:...
-
There are, at least, two fundamental factors that led the court to entirely reverse its earlier interpretation despite no change in the words. What would be your "best guess" as to one of them?...
-
A truck travels due east for a distance of 1.7 km, turns around and goes due west for 6.0 km, and finally turns around again and travels 3.4 km due east. (a) What is the total distance (in km) that...
-
8. If you combine the chain rule with the tangent rule, [tan u] = tanu du dx A. True B. False 9. Suppose the position function for a free-falling object on a certain planet is given by s(t) = -16+ +...
-
1-Stern observed all of the following results EXCEPT _______ in his experiment. A-one of the recombinant phenotypes was associated with an X chromosome of normal length B-the number of car, B+ male...
-
Draw a project balance chart for Problem 18. Data From Problem 18: 18. Your company is looking at purchasing a loader at a cost of $125,000. The loader would have a useful life of
-
Monroe Company processes a food seasoning powder through its Compounding and Packaging departments. In the Compounding Department, direct materials are added at the beginning of the process, and...
-
Riley Manufacturing Corporation produces a cosmetic product in three consecutive processes. The costs of Department 1 for May 2019 were as follows: Department 1 handled the following units during...
Study smarter with the SolutionInn App