Related questions
this module is java 371. please answer all questions correctly , include all comments etc and follow all requirements.
Question 1: (40 MARKS)
E-Hailing Bicycle Management System
Case Study:
An e-hailing company that rents out bicycles needs a system to manage its bicycles, users, and borrowing process. Each user can borrow up to 2 bicycles at a time, specifically for families with children 18 years or below. The system must track the bicycles (name, make, type, and availability) and users (name, ID, and borrowed bicycles).
The company also wants to ensure that the system uses a multidimensional array to store information about the bicycles.
Requirements:
-
Add and View Bicycles:
-
Borrow Bicycles:
-
Return Bicycles
-
Display Borrowed Bicycles and Search for a bicycle
-
Create a menu-driven program to implement the above.
Sample Output:
-
Add Bicycle
-
View All Bicycles
-
Borrow Bicycle
-
Return Bicycle
-
View Borrowed Bicycles
-
Search Bicycle
-
Exit
Enter your choice:
Question 2 (30 MARKS)
Pentagonal Numbers
Problem Statement
Create a Java program that will display the first 40 pentagonal numbers. Hint: A pentagonal number is a
figurate number that extends the concept of triangular and square numbers to the pentagon, but, unlike the
first two, the patterns involved in the construction of pentagonal numbers are not rotationally symmetrical.
Expected Output:
| 1 | 5 | 12 | 22 | 35 | 51 | 70 | 92 | 117 | 145 |
|---|---|---|---|---|---|---|---|---|---|
| 176 | 210 | 247 | 287 | 330 | 376 | 425 | 477 | 532 | 590 |
| 651 | 715 | 782 | 852 | 925 | 1001 | 1080 | 1162 | 1247 | 1335 |
| 1426 | 1520 | 1617 | 1717 | 1820 | 1926 | 2035 | 2147 | 2262 | 2380 |
| 2501 | 2625 | 2752 | 2882 | 3015 | 3151 | 3290 | 3432 | 3577 | 3725 |
Question3: (30 MARKS)
Passenger Rail Agency for South Africa Train Scheduling System
Problem Statement
Design and implement a train scheduling system for Prasa railway network. The system should handle the following functionalities:
-
Scheduling trains: Allow the addition of train schedules, ensuring that no two trains use the same platform at the same time at any station.
-
Dynamic updates: Enable adding new train schedules and canceling existing ones.
-
Real-time simulation: Use multithreading to simulate the operation of trains (e.g., arriving, departing).
-
Data management: Use ArrayList to manage train schedules and platform assignments.
Requirements
-
Add Train Schedule, Cancel Scheduled Train, View Train Schedules and Platform Management
-
Concurrency Handling with Multithreading i.e Use threads to simulate train operations, Each train runs as a separate thread, simulating its arrival, departure, and travel status.
-
Use ArrayList to manage train schedules for each station, Platform availability.
I DONT WANT AN
to generate a solution
a solution
- Text book imageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningText book imageNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageText book imageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- Text book imageEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage LearningText book imageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LText book imageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning