11 A car company has introduced a driver incentive program to boost morale and motivate drivers to improve their work performance. Each driver will be rewarded with R10 per passenger from all his trips in a month. The maximum number of passengers a driver can carry depends on the capacity of the vehicle chosen at each trip. Each trip starts and stops in the depot, and this is when a driver is allowed to change vehicles. A driver has been given the information in the table below to decide a schedule of trips for the month. Your task is to help the driver decide on an optimal schedule. To this end, write a java program that outputs answers to the following questions: a. What is the maximum number of passengers the driver can carry? b. What is the maximum amount of commission that can be made? c. What are the cars that will be driven to earn this commission? Car Trip Start time Trip End time Number of Passengers A 03:00 16:00 21 B 01:00 08:00 10 C 09:00 21:00 20 Ꭰ 22:00 00:00 2 E 02:00 04:00 5 F 07:00 12:00 7 G 15:00 19:00 10 H 17:00 00:00 10 I 05:00 10:00 7 J 11:00 14:00 6 K 00:00 06:00 8 L 20:00 23:00 3 M 13:00 18:00 12 FROM HOPE TO ACTION THROUGH KNOWLEDGE. UNIVERSITY of the WESTERN CAPE University of the Western Cape Department of Computer Science Additional Instructions: An example of the output of your code should be: The maximum number of passengers is XXXX The maximum commission possible is RXXXX The cars driven to earn the maximum commission are P, Q, R and 2. No input file is required; however, an output file is required and must be submitted separately from the java implementation. Your algorithm implementation will be graded on correctness as well as efficiency. Look carefully through the algorithms you have learnt so far in the course and pick the most efficient for this task.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please provide a Java Code and a text file showing the output. The instructions are provided in the image below. 

11
A car company has introduced a driver incentive program to boost morale
and motivate drivers to improve their work performance. Each driver will
be rewarded with R10 per passenger from all his trips in a month. The
maximum number of passengers a driver can carry depends on the capacity
of the vehicle chosen at each trip. Each trip starts and stops in the depot,
and this is when a driver is allowed to change vehicles.
A driver has been given the information in the table below to decide a
schedule of trips for the month. Your task is to help the driver decide on an
optimal schedule. To this end, write a java program that outputs answers to
the following questions:
a. What is the maximum number of passengers the driver can carry?
b. What is the maximum amount of commission that can be made?
c. What are the cars that will be driven to earn this commission?
Car
Trip
Start time
Trip
End time
Number of
Passengers
A
03:00
16:00
21
B
01:00
08:00
10
C
09:00
21:00
20
Ꭰ
22:00
00:00
2
E
02:00
04:00
5
F
07:00
12:00
7
G
15:00
19:00
10
H
17:00
00:00
10
I
05:00
10:00
7
J
11:00
14:00
6
K
00:00
06:00
8
L
20:00
23:00
3
M
13:00
18:00
12
FROM HOPE TO ACTION THROUGH KNOWLEDGE.
UNIVERSITY of the
WESTERN CAPE
University of the Western Cape
Department of Computer Science
Additional Instructions:
An example of the output of your code should be:
The maximum number of passengers is XXXX
The maximum commission possible is RXXXX
The cars driven to earn the maximum commission are P, Q, R and 2.
No input file is required; however, an output file is required and must be
submitted separately from the java implementation.
Your algorithm implementation will be graded on correctness as well as
efficiency. Look carefully through the algorithms you have learnt so far in
the course and pick the most efficient for this task.
Transcribed Image Text:11 A car company has introduced a driver incentive program to boost morale and motivate drivers to improve their work performance. Each driver will be rewarded with R10 per passenger from all his trips in a month. The maximum number of passengers a driver can carry depends on the capacity of the vehicle chosen at each trip. Each trip starts and stops in the depot, and this is when a driver is allowed to change vehicles. A driver has been given the information in the table below to decide a schedule of trips for the month. Your task is to help the driver decide on an optimal schedule. To this end, write a java program that outputs answers to the following questions: a. What is the maximum number of passengers the driver can carry? b. What is the maximum amount of commission that can be made? c. What are the cars that will be driven to earn this commission? Car Trip Start time Trip End time Number of Passengers A 03:00 16:00 21 B 01:00 08:00 10 C 09:00 21:00 20 Ꭰ 22:00 00:00 2 E 02:00 04:00 5 F 07:00 12:00 7 G 15:00 19:00 10 H 17:00 00:00 10 I 05:00 10:00 7 J 11:00 14:00 6 K 00:00 06:00 8 L 20:00 23:00 3 M 13:00 18:00 12 FROM HOPE TO ACTION THROUGH KNOWLEDGE. UNIVERSITY of the WESTERN CAPE University of the Western Cape Department of Computer Science Additional Instructions: An example of the output of your code should be: The maximum number of passengers is XXXX The maximum commission possible is RXXXX The cars driven to earn the maximum commission are P, Q, R and 2. No input file is required; however, an output file is required and must be submitted separately from the java implementation. Your algorithm implementation will be graded on correctness as well as efficiency. Look carefully through the algorithms you have learnt so far in the course and pick the most efficient for this task.
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education