Create a flowchart and java code for the following: 1. Sandwich Counter System Description: The program will display the three sandwiches being sold with their price The program accepts input from a user’s choice of the sandwich by pressing 1 for a hotdog, 2 for hamburger and 3 for bacon The program is able to accept input of quantity of order from the user The program is able to display the total amount of the order The program is able to accept input of payment received The program is able to summarize the purchasing transaction such as total price, payment received, change from a purchase.

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

Create a flowchart and java code for the following:
1. Sandwich Counter System
Description:
The program will display the three sandwiches being sold with their price
The program accepts input from a user’s choice of the sandwich by pressing 1 for a hotdog, 2 for
hamburger and 3 for bacon
The program is able to accept input of quantity of order from the user
The program is able to display the total amount of the order
The program is able to accept input of payment received
The program is able to summarize the purchasing transaction such as total price, payment
received, change from a purchase.

2. Voting system
Description:
Create a program that will count the number of votes per presidentiable candidate and be able to
declare the highest vote
The program is able to accept a maximum of 10 voters only
The voter is able to select 1 candidate per vote

The program is able to know if there is a tie. If a tie occurs on the highest, the program will
display, “NO WINNER!” else the program will declare the highest vote.

SAMPLE RUN:
SANDWICH PRICE:
HOTDOG : P20
HAMBURGER : P25
BACON : P30
Press 1, for HOTDOG
Press 2, for HAMBURGER
Press 3, for BACON
2
You choose HAMBURGER
How many?
2
The total amount is 50
PAYMENT RECEIVED?
50
SUMMARY:
Total Price: 50
Payment received: 50
Change: 0
Transcribed Image Text:SAMPLE RUN: SANDWICH PRICE: HOTDOG : P20 HAMBURGER : P25 BACON : P30 Press 1, for HOTDOG Press 2, for HAMBURGER Press 3, for BACON 2 You choose HAMBURGER How many? 2 The total amount is 50 PAYMENT RECEIVED? 50 SUMMARY: Total Price: 50 Payment received: 50 Change: 0
SAMPLE RUN:
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
1 Enter your vote?
4
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
2 Enter your vote?
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
3 Enter your vote?
3
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
4 Enter your vote?
3
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
5 Enter your vote?
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
6 Enter your vote?
2
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
7 Enter your vote?
2
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
8 Enter your vote?
2
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
9 Enter your vote?
1
Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong
10 Enter your vote?
Lacson 2
Robredo - 3
Isko -3
Bongbong = 2
NO WINNER!
Transcribed Image Text:SAMPLE RUN: Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 1 Enter your vote? 4 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 2 Enter your vote? Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 3 Enter your vote? 3 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 4 Enter your vote? 3 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 5 Enter your vote? Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 6 Enter your vote? 2 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 7 Enter your vote? 2 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 8 Enter your vote? 2 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 9 Enter your vote? 1 Press 1 for Lacson; 2 for Lenie; 3 for Isko; 4 for Bongbong 10 Enter your vote? Lacson 2 Robredo - 3 Isko -3 Bongbong = 2 NO WINNER!
Expert Solution
steps

Step by step

Solved in 3 steps with 1 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