Question 1:

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:

  1. Add and View Bicycles:
  2. Borrow Bicycles:
  3. Return Bicycles
  4. Display Borrowed Bicycles and Search for a bicycle
  5. Create a menu-driven program to implement the above.

Sample Output:

Question 2:

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:

15122235517092117145
176210247287330376425477532590
65171578285292510011080116212471335
1426152016171717182019262035214722622380
2501262527522882301531513290343235773725

Question 3:

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:

  1. Scheduling trains: Allow the addition of train schedules, ensuring that no two trains use the same platform at the same time at any station.
  2. Dynamic updates: Enable adding new train schedules and canceling existing ones.
  3. Real-time simulation: Use multithreading to simulate the operation of trains (e.g., arriving, departing).
  4. Data management: Use ArrayList to manage train schedules and platform assignments.

Requirements

  1. Add Train Schedule, Cancel Scheduled Train, View Train Schedules and Platform Management
  2. 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.
  3. Use ArrayList to manage train schedules for each station, Platform availability.

Answers to Above Questions on Programming

Answer 1: The creation of a system reflecting Add and View Bicycles, Borrow Bicycles, Return Bicycles is performed as follows:

Hire the best programming expert from the team of writers of assignmenthelp.co.za in South Africa to get answers to above questions.