Question 1: E-Hailing Bicycle Management System (40 MARKS) 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: 1. Add Bicycle 2. View All Bicycles 3. Borrow Bicycle 4. Return Bicycle 5. View Borrowed Bicycles 6. Search Bicycle 7. Exit Enter your choice: Question 2 Pentagonal Numbers Problem Statement (30 MARKS) 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 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

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...
icon
Related questions
Question

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:

  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:

  1. Add Bicycle

  2. View All Bicycles

  3. Borrow Bicycle

  4. Return Bicycle

  5. View Borrowed Bicycles

  6. Search Bicycle

  7. 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:

  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.

Question 1:
E-Hailing Bicycle Management System
(40 MARKS)
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:
1. Add Bicycle
2. View All Bicycles
3. Borrow Bicycle
4. Return Bicycle
5. View Borrowed Bicycles
6. Search Bicycle
7. Exit
Enter your choice:
Transcribed Image Text:Question 1: E-Hailing Bicycle Management System (40 MARKS) 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: 1. Add Bicycle 2. View All Bicycles 3. Borrow Bicycle 4. Return Bicycle 5. View Borrowed Bicycles 6. Search Bicycle 7. Exit Enter your choice:
Question 2
Pentagonal Numbers
Problem Statement
(30 MARKS)
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
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
Transcribed Image Text:Question 2 Pentagonal Numbers Problem Statement (30 MARKS) 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 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
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

Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY