Discount = ticket price * discount rate / 100 final price ticket price- Discount Number of Reservations discount rate Using java 5-10 10% >10 25% Sample Run 1: Enter the ticket price and number of history reservations: 15000 3 Discount Amount is: 0.0 Final price is: LL 150.0 Sample Run 2: Enter the ticket price and mumber of history reservations: 15000 6 Discount Amount is: 1500.0 Final price is LA 13500.0 Sample Run 3 Enter the ticket price and number of history reservations 15000 11 Dacount Amount is 37500 Final price is LL11250.0

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
i need the answer quickly
D 3:32
4G
83%
...
content://org.tele
+
18
Discount = ticket price discount rate / 100
final price = ticket price- Discount
Number of Reservations discount rate
Using java
5-10
10%
>10
25%
Sample Run 1:
Enter the ticket price and number of history reservations: 15000 3
Discount Amount is: 0.0
Final price is: LL 15000.0
Sample Run 2:
Enter the ticket price and number of history reservations 150006
Discount Amount is: 1500.0
Final price is LA 13500.0
Sample Run 3:
Enter the ticket price and number of history reservations: 15000 11
Discount Amount is 37500
Final price is L11250.0
solution :)
Step 1 of 4:)
Steps
• Take price and history reservation as
input.
• Based on history reservation, compute
discount and discounted prie.
• Print the discount and discounted price
Step 2 of 4)
import java.util.
public class Main
public static void main(Stringf) args){
System.out println("Enter the ticket
price and umber of histary reservations: "):
Scanner se- new Scanner(System.in);
double p- sc.nextDouble):
int n= sc.nextint();
double dis, final p:
ifin<3)
dis-0.0;
final p-p:
else ifin>-5 && ns-10)
dis=p"(10.0/100.0);
System.out.printin("Discount Amount
is: "rdis):
final p-p dis;
else
dis-p"(25.0/100.0);
final p=p-dis;
System.outprintln("Discount Amount is
*edisi:
System.out.printin"Tinal price is:
"-final pk
Step 3 of 4)
Man va
1 Import java.util.;
2 public cldss Mein
public static void main(tring () args) {
Syan. out.printin("Enter the ticket price and number of history reservations: ");
Scanner se= ne Scanner(yten.in);
dauble p sc.nextDouble():
int n sc.nextInt();
double dis, final_p;
18
12
if(n<5)
13
dis-0.0;
final p Pi
16
17
Transcribed Image Text:D 3:32 4G 83% ... content://org.tele + 18 Discount = ticket price discount rate / 100 final price = ticket price- Discount Number of Reservations discount rate Using java 5-10 10% >10 25% Sample Run 1: Enter the ticket price and number of history reservations: 15000 3 Discount Amount is: 0.0 Final price is: LL 15000.0 Sample Run 2: Enter the ticket price and number of history reservations 150006 Discount Amount is: 1500.0 Final price is LA 13500.0 Sample Run 3: Enter the ticket price and number of history reservations: 15000 11 Discount Amount is 37500 Final price is L11250.0 solution :) Step 1 of 4:) Steps • Take price and history reservation as input. • Based on history reservation, compute discount and discounted prie. • Print the discount and discounted price Step 2 of 4) import java.util. public class Main public static void main(Stringf) args){ System.out println("Enter the ticket price and umber of histary reservations: "): Scanner se- new Scanner(System.in); double p- sc.nextDouble): int n= sc.nextint(); double dis, final p: ifin<3) dis-0.0; final p-p: else ifin>-5 && ns-10) dis=p"(10.0/100.0); System.out.printin("Discount Amount is: "rdis): final p-p dis; else dis-p"(25.0/100.0); final p=p-dis; System.outprintln("Discount Amount is *edisi: System.out.printin"Tinal price is: "-final pk Step 3 of 4) Man va 1 Import java.util.; 2 public cldss Mein public static void main(tring () args) { Syan. out.printin("Enter the ticket price and number of history reservations: "); Scanner se= ne Scanner(yten.in); dauble p sc.nextDouble(): int n sc.nextInt(); double dis, final_p; 18 12 if(n<5) 13 dis-0.0; final p Pi 16 17
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY