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
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...
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff18ba195-deda-4ae2-804f-4d46d2b04401%2F1ea822f8-bc1c-4637-844a-b04a7a353241%2Fg5wyo3n_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY