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...
-
On August 1, 2014, Dana Hendley established Advice, a business-consulting firm organized as a proprietorship. The following conversation occurred the following February between Dana and a former...
-
Strassel Investors buys real estate, develops it, and resells it for a profit. Anew property is available, and Bud Strassel, the president and owner of Strassel Investors, believes it can be sold for...
-
(a) As the electric motor shown schematically in Figure P28.30 operates, which of the arrows shown could represent the magnetic dipole moment at various instants? (b) If there are any arrows that are...
-
Montoro petitioned himself into voluntary bankruptcy. There were three major claims against his estate. One was made by Carlton, a friend who held Montoros negotiable promissory note for $2,500; one...
-
"Managing Away Bad Habits Team Assignment Organizational Behavior IILeadership Assigned is ashort case from the exercise Managing Away Bad Habits. The task is to develop a turnaround strategy for...
-
In a volumetric determination of an analyte A, the data obtained and their standard deviations are as follows: From the data, find the coefficient of variation of the final result for the % A that is...
-
Calculate the warranty expense for 2017 using the following information: 2017 sales $ 500,000 The sales have a 2 year warranty with an estimate of returns in year 1 of 3% and in year 2 of 7%.
-
The globe is facing an increase in water demand resulting in the need for additional agricultural land and irrigation water. Elyamany and El-Nashar (2013) provided an illustration of a financial...
-
What is the capacitance of a spherical capacitor consisting of two concentric conducting spherical shells of radii \(R_{1}\) and \(R_{2}>R_{1}\) ?
-
Writing in The Australian Financial Review Jack Mintz states that for investment decisions, taxes matter, and Australias company tax rate (30 per cent) is too high in international terms to be...
-
Public sector organizations increasingly must account for their performance and provide quality services at lower costs. To accomplish this many local authorities and public sector organizations have...
-
A 2011 guidance paper commissioned by the Institute of Risk Management gives some useful detail on what risk appetite is and how to manage it either in a corporate governance sense or to inform how...
-
In QPSK ( ( Quadrature Phase Shift Keying ) , ) , how many bits are represented by each symbol? A . 1 . 1 B . 2 . 2 C . 4 . 4 D . 8 . 8
-
Before the latest financial crisis and recession, when was the largest recession of the past 50 years, and what was the cumulative loss in output over the course of the slowdown?
-
Show that the pressure and Helmholtz free energy of a fluid at temperature \(T\) can be determined by performing a thermodynamic integration of the inverse of the isothermal compressibility from the...
-
Derive the probability distribution \(w(r)\) for the distance to the closest neighboring particle using the pair correlation function \(g(r)\) and the number density \(n\). Show that in three...
-
Show that for a gas of noninteracting bosons, or fermions, the pair correlation function \(g(r)\) is given by the expression \[g(r)=1 \pm \frac{g_{s}}{n^{2} h^{6}}\left|\int_{-\infty}^{\infty}...
Windows Server 2008 All In One Desk Reference For Dummies 1st Edition - ISBN: 0470180447 - Free Book
Study smarter with the SolutionInn App