Case-Study: A bus company in the West- Midlands operates the number X123 between Worcester Bus Station to Birmingham City Centre. The bus has 8 stops between the two end stops. The bus service is only between 6.30am to 9.30am and then from 6.30pm to 9.30pm. There is one bus leaving Worcester Bus Station at 6:33 AM/PM, 7:33 AM/PM, and 8:33 AM/PM to Birmingham City Centre. Similarly, there is a bus leaving from Birmingham City Centre to Worcester at 6:35 AM/PM, 7:35 AM/PM and 8:35 AM/PM. The fare for an adult is £3.00 and for a child (less than 12 years and older than 2 years) is £2.10. These fares are fixed and not dependent on the length of the journey. Where a child accompanies an adult, the adult pays the fare for the child. A passenger with a pass does not pay any fare. The codes shown in table 1 are entered by the bus driver for each passenger to calculate the fare to be paid by the passenger. There is no facility to pay by card on the bus and any fare paying passenger must only pay by cash. Table 1. Passenger types, codes and fares Passenger type Passenger code Fare paying adult FPA FPC C PP Fare £3.00 £2.10 £0.0 £0.0 Fare paying child Child below 2 years Passenger with pass Task 1: Joe Bloggs takes the 7:35 bus from Birmingham with his two children (a three- year-old and a one-year-old). A friend of Joe also takes the same with their three children (a sixyear old, a four-year old and a three-year old). Joe's friend only has a £5.00 note, £2.00 coin and £1.00 coin. Joe offers to pay the rest of the cash for his friend. Provide a flowchart along with pseudo code for calculating the amount paid by Joe Bloggs and fully justify the structures and logic used in the pseudo code. Using the pseudo code as your guide, write a Java method to calculate the total amount paid by Joe Bloggs and test your code by printing the total amount paid. Provide the output to verify full functionality.
Case-Study: A bus company in the West- Midlands operates the number X123 between Worcester Bus Station to Birmingham City Centre. The bus has 8 stops between the two end stops. The bus service is only between 6.30am to 9.30am and then from 6.30pm to 9.30pm. There is one bus leaving Worcester Bus Station at 6:33 AM/PM, 7:33 AM/PM, and 8:33 AM/PM to Birmingham City Centre. Similarly, there is a bus leaving from Birmingham City Centre to Worcester at 6:35 AM/PM, 7:35 AM/PM and 8:35 AM/PM. The fare for an adult is £3.00 and for a child (less than 12 years and older than 2 years) is £2.10. These fares are fixed and not dependent on the length of the journey. Where a child accompanies an adult, the adult pays the fare for the child. A passenger with a pass does not pay any fare. The codes shown in table 1 are entered by the bus driver for each passenger to calculate the fare to be paid by the passenger. There is no facility to pay by card on the bus and any fare paying passenger must only pay by cash. Table 1. Passenger types, codes and fares Passenger type Passenger code Fare paying adult FPA FPC C PP Fare £3.00 £2.10 £0.0 £0.0 Fare paying child Child below 2 years Passenger with pass Task 1: Joe Bloggs takes the 7:35 bus from Birmingham with his two children (a three- year-old and a one-year-old). A friend of Joe also takes the same with their three children (a sixyear old, a four-year old and a three-year old). Joe's friend only has a £5.00 note, £2.00 coin and £1.00 coin. Joe offers to pay the rest of the cash for his friend. Provide a flowchart along with pseudo code for calculating the amount paid by Joe Bloggs and fully justify the structures and logic used in the pseudo code. Using the pseudo code as your guide, write a Java method to calculate the total amount paid by Joe Bloggs and test your code by printing the total amount paid. Provide the output to verify full functionality.
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
Please send me answer of this question within 10 min i will give you like sure.send me typed answer only please
Expert Solution
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 5 steps with 3 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
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)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY