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.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter19: Probabilistic Dynamic Programming
Section19.4: Further Examples Of Probabilistic Dynamic Programming Formulations
Problem 7P
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
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole