Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirement: Python Program file or Code (Insist you to attach running Python file) Question: The system allows a student to list the available courses, search

Requirement: Python Program file or Code (Insist you to attach running Python file)

Question: The system allows a student to list the available courses, search for a course, enrol, and list his/her courses. The main program should first display a menu as follows. A student needs to select an option from the main menu.
=======================================================

Welcome to Online Courses Management System
=======================================================
<1> List the available courses
<2> Search for a course
<3> Enrol in a course
<4> List my courses
<5> Quit
Please select an option from the above: 1
If a student chooses the option <1>, the program will list all available courses showing course ID and name. Then the student selects the course ID that he/she wants to enrol or 0 to exit. The program will display the course detail, including name, cost and length.
A typical example of the program display (once a student chooses the option <1>) can be as follows. Your program MUST follow the same display style.
The available courses are:

1- Python
2- Java
3- C#
4- Data science

=======================================================
Welcome to Online Courses Management System
=======================================================

<1> List the available courses
<2> Search for a course
<3> Enrol in a course
<4> List my courses
<5> Quit
Please select an option from the above: 2
If a student chooses the option <2> from the main menu, the system asks the student to enter the course name to see details. To facilitate the search option, you need to read from the courses dictionary and list all matched courses as below. If the course is not in the courses list, then the system must print a message to the student saying this curse is not available.
After displaying the courses' list, the system prompts the student with the following message, 'Do you want to search for another course (Y/N)?' If a student enters 'Y', the system asks the student to enter the course name; if the student enters 'N', the program displays the main menu. Otherwise, the program prompts the same message again.
Please enter the course name you want to search or 0 to exit: Python Thank You!
One course has been found:
Name: Python
Cost: $180
Total length: 20 hours
Do you want to search for another course (Y/N)? N
======================================================= Welcome to Online Courses Management System
=======================================================
<1> List the available courses
<2> Search for a course
<3> Enrol in a course
<4> List my courses
<5> Quit
Please select an option from the above: 3

If a student chooses the option <3> the program, then it will list all available courses showing course ID and name. Then the student selects the course ID that he/she wants to enrol or 0 to exit. The program will display the course detail, including name, cost and length then the program will ask the student to confirm his/her enrolment. After that, the system asks for student credit or debit card details. However, if the student selects N, then the system will display the main menu again. Otherwise, it will ask the same question again.
A typical example of the program display (once a student chooses the option <3>) can be as follows.
Your program MUST follow the same display style.
The available courses are:

5- Python
6- Java
7- C#
8- Data science
Please select the course code you want to enrol or 0 to exit: 1
Course detail:
Name: Python
Cost: $150
Total length: 15 hours
Do you want to enrol in this course (Y/N)? Y
Congratulation you received a 10% discount. You need to pay only $135.
Please enter your credit or debit card details:
Name on Card: Harry John
Card Number: 1234567898
MM:09 YYYY:2022
Thank You!
You have been added to the Python course.
Do you want to enrol in another course (Y/N)? N
======================================================= Welcome to Online Courses Management System
=======================================================
<1> List the available courses
<2> Search for a course
<3> Enrol in a course
<4> List my courses
<5> Quit
Please select an option from the above: 4

If a student chooses the option <4> from the main menu, the system asks the student to enter his/her name. The system then collects the student details and display them as follow (assuming the following student was searched for). If the name cannot find the system must show an error message to the student. To facilitate the search option, you need to use an appropriate data structure such as a List.

Hello John, you are enrolled in the following courses:
1- Java, 20 hours
2- Python, 15 hours
Finally, the program quits if the student chooses the option <5>.
=======================================================
Welcome to Online Courses Management System
=======================================================
<1> List the available courses
<2> Search for a course
<3> Enrol in a course
<4> List my courses
<5> Quit
Please select an option from the above: 5
Goodbye
Note:
• You must use multiple functions instead of using a single function to do everything.
• You must handle exceptions appropriately, such as string values instead of numbers etc.
• You must use appropriate data structures such as Lists, Dictionaries etc.
• Your program should be able to handle some exceptions such as invalid inputs undefined inputs with error messages, e.g.:
o The Credit or Debit Card number must be 10 digits.

o The Credit or Debit Card MM must be 2 digits.
o The Credit or Debit Card YYYY must be 4 digits.

Draw system flowchart/s that present the steps of the algorithm required to perform the major system tasks
 

Implement system in Python. Comment on your code as necessary to explain it clearl

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Implement a maxheap using an array implementation.

Answered: 1 week ago