Develop maintainable and reusable solutions

Assignment Help Python Programming
Reference no: EM132969592

COSC2531 Programming Fundamentals - RMIT University

1. Overview

The objective of this assignment is to develop your programming and problem-solving skills in a step-by-step manner. The different stages of this assignment are designed to gradually introduce different basic programming concepts.

You should develop this assignment in an iterative fashion (as opposed to completing it in one sitting). You can and should get started now (when this assignment specification is posted on Canvas) as there are concepts from previous lessons that you can employ to do this assignment.
If there are questions, you can ask via the lectorial, practical sessions or the Canvas discussion forum (Canvas/Discussions/Discussion on Assessment 1). Note that the Canvas discussion forum is preferable as it allows other students to see your questions as well. Also, you should ask questions in a general manner, for example, you should replicate your problem in a different context in isolation before posting, and you must not post your code on the Canvas discussion forum.

Assessment Criteria
This assignment will determine your ability to:
i. Follow coding, convention and behavioural requirements provided in this document and in the course lessons;
ii. Independently solve a problem by using programming concepts taught over the first several weeks of the course;
iii. Write and debug Python code independently;
iv. Document code;
v. Provide references where due;
vi. Meet deadlines;
vii. Seek clarification from your "supervisor" (instructor) when needed via the Canvas discussion forums; and
viii. Create a program by recalling concepts taught in class, understand and apply concepts relevant to solution, analyse components of the problem, evaluate different approaches.

Learning Outcomes
This assignment is relevant to the following Learning Outcomes:
1. Analyse simple computing problems.
2. Devise suitable algorithmic solutions and code these algorithmic solutions in a computer programming language.
3. Develop maintainable and reusable solutions.
Specifically, upon the completion of this assignment, you will be able to:
• Demonstrate knowledge of basic concepts, syntax and control structures in programming
• Devise solutions for simple computing problems under specific requirements
• Encode the devised solutions into computer programs and test the programs on a computer
• Demonstrate understanding of standard coding conventions and ethical considerations in programming

Problem Overview: In this assignment, you are developing a bus booking system for a travel agency which delivers bus services from Melbourne to other destinations in Australia. The agents from the travel agency are the ones that use this system to book trips for customers. You are required to implement the program following the below requirements.

Requirements: Your code must meet the following functionalities, code and documentation requirements. Your submission will be graded based on the rubric published on Canvas. Please ensure you read all the requirements and the rubric carefully before working on your assignment.

PART 1
In this part, your program can perform some simple interactions with users (i.e. the travel agents):
1. Display a message asking the user to enter the name of the customer.
2. Display a message asking the user to enter the destination the customer chooses. You can assume the destination to be entered is always a valid destination.
3. Display a message asking the number of tickets the customer books for the destination that was entered earlier. You can assume the quantity to be entered is always a positive integer,
e.g. 1, 2, 3 ...

4. Calculate the total cost for the customer including the discount (see No. 5 below).
5. For customers with membership, 5% discount will apply. No discount for customers without membership.
6. The total cost will be displayed as a formatted message to the user, e.g.
<customer name > books <quantity> tickets to <destination>.
<customer name> gets a discount of <discount percentage>%. Unit price: <the price of each ticket> (AUD)
Total price: <the total price> (AUD)
7. In the program, you should have some lists (or dictionaries or other data types) to store the names of all customers, the names of customers with membership, the available destinations, the prices corresponding to those destinations. You can assume the customer names and the destinations are all unique and case sensitive.
8. When a new customer books a trip, add the customer name to the customer list. Also, when any customer books a trip, check if they have a membership; if they currently don't have a membership, display a message asking if they want to have a membership. If yes, then add the customer name to the customers with membership list. The discount is applied immediately after the customer is added to the customers with membership list. You can assume the answer entered is always either y or n (meaning yes or no, respectively).
9. Note: in the requirements No. 7 & 8, we use the term 'list' when describing the customer list, customer with membership list, etc. But you can use other data types to store this information such as dictionaries and other data types. Make sure you think and analyse the requirements in detail so that you can choose the most appropriate/suitable data types.

PART 2
In this part, your program can: (a) perform some additional requirements compared to PART 1, and
(b) be operated using a menu.
First, compared to the requirements in PART 1, now your program can:
1. Display an error message if the destination entered by the user does not exist in the destination list. When this error occurs, the user will be given another chance, until a valid destination is entered.
2. Display an error message if the ticket quantity is 0, negative or not an integer. When this error occurs, the user will be given another chance, until a valid positive integer quantity is entered.
3. Display an error message if the answer by the user is not y or n when asking if the customer wants a membership. When this error occurs, the user will be given another chance, until a valid answer (i.e. y, n) is entered.
Second, your program will be operated using a menu. A menu-driven program is a computer program in which options are offered to the users via the menu. Your program will have the following options: book a new trip, add a new destination, display all existing customers, display all customers with membership, display all valid destinations with their prices, exit the program. Below are the specifications of the options:
1. Book a new trip: this option includes all the requirements from 1 to 8 in PART 1 and the requirements 1 to 3 in the first part of PART 2.
2. Add a new destination: this option displays a message asking user to add a new destination, and another message asking user to enter the price of the added destination. User can add multiple destinations (and their prices) in a sequential manner. That is, after adding one new

destination and its price, the user will be asked if they want to add another destination. Besides, if the destination already exists in the current destination list, the user will be given another chance, until a new destination is entered. You can assume the price entered is always a valid number. If the price is negative or 0, then display a message asking user to enter again until the price is positive.
3. Display all existing customers: this option displays the names of all existing customers on screen.
4. Display all customers with membership: this option displays the names of all customers with membership on screen.
5. Display all valid destinations: this option displays all the destinations on screen, with their prices.
6. Exit the program: this option allows users to exit the program.
Note that in your program, when a task (option) is accomplished, the menu will appear again for the next task.

PART 3
In this part, your menu program is equipped with some advanced features. Note, some features maybe challenging.
1. In the Book a new trip option: now the program will also display a message asking if customer wants to order extra service (apart from the bus tickets). If yes, display a message asking which extra service customer wants to order. The available extra services are internet, snack, drink. Their corresponding prices are 0, 10, 5 respectively. Customer can only order one extra service. Note that:
a. The total price is the tickets price and the extra service price.
b. The 5% discount is only applied to the tickets price.
c. Only customers with membership can order free extra service (i.e. services with price of 0).
d. Display an error message if the answer by the user is not y or n when asking if customer wants to order extra service. When this error occurs, the user will be given another chance, until a valid answer (i.e. y, n) is entered.
e. Modify the cost formatted message (in PART 1) to be as follows.
<customer name > books <quantity> tickets to <destination>.
<customer name> gets a discount of <discount percentage>%. Unit price: <the price of each ticket> (AUD) Extra service price: <the price of the extra service> (AUD) Total price: <the total price> (AUD)
2. The menu now has an option to reveal the most valuable customer. That is the customer with maximum total money spent to date. If there are multiple customers with the same maximum money spent, you just need to display one customer.
3. The menu also has an option to display the customer order history. The option will display a message asking user to enter the name of the customer, and the program will display all the previous orders of that customer, including the destinations they book and the corresponding number of tickets. For example, if a customer named James booked 10 tickets to Sydney, 1 ticket to Adelaide, 4 tickets to Sydney, 5 tickets to Canberra previously, then the program will display the formatted message as follows.
This is the order history of James. Destination Number of tickets

Sydney: 10
Adelaide: 1
Sydney: 4
Brisbane: 5
Note that for this option, if the user enters non-existing customer, then your program needs to give the user another chance, until an existing customer is entered.

Attachment:- Programming Fundamentals.rar

Reference no: EM132969592

Questions Cloud

List clear sales and marketing objectives : 1. List clear sales and marketing objectives with outcome targets to identify how success will be measured.
Would Comma Ltd be selling a profitable amount of Gold : Would Comma Ltd. be selling a profitable amount of Gold if fixed costs are now £4,000, all else equal? Explain your answer in detail
Use the afn equation to forecast company additional funds : The after-tax profit margin is forecasted to be 7%, and the forecasted payout ratio is 55%. Use the AFN equation to forecast Company's additional funds needed
Several forces for organizational change : In Chapter 7 of the text, there are several forces for organizational change: workplace demographics, technology, globalization, market conditions, growth, and
Develop maintainable and reusable solutions : Problem-solving skills in a step-by-step manner. The different stages of this assignment are designed to gradually introduce different basic programming concept
Calculate the tax shield for the company provided : The company's market value is SEK 12 billion and it is financed 100% with equity. Calculate the tax shield for the company provided
Why is necessary to inform an applicant about the terms : Why is necessary to inform an applicant about the terms and conditions and interest rates of a loan? Is it a legal obligation of a mortgage broker to inform
What is the ending balance in this account : Assuming no prior balance in the Additional Paid-in Capital from Treasury Stock Transactions, what is the ending balance in this account
What the company debt-to-equity ratio is closest to : What the company's debt-to-equity ratio is closest to? Stephanie Co. has total assets of $170,000 of which $110,000 are not current assets.

Reviews

Write a Review

Python Programming Questions & Answers

  Create an infinite game loop

ISCG 5420 Programming - design into a Python program. Your final program must compile correctly using Python IDLE as configured in Unitec computing labs

  Asign true to the variable has_dups

Asign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

  Write a program to determine the coefficients of expanded

Write a program to determine the coefficients of expanded form of (aX+bY+c)n. Every line in bold is questions to ask whoever runs the program to enter values or commands (y or n) at the console.

  Define a class person and its two child classes

Define a class Person and its two child classes: Male and Female. All classes have a method getGender which can print Male for Male class and Female for Female.

  Write a program in python to draw a blue triangle

Write a program in Python to draw a blue triangle in a drawing window. Write a program in Python that moves the triangle in an animated movement. Write a program in Python to draw a simplified face.

  Calculate the sum of the first n odd numbers

A program that ask the user for a username and password and read the names and password from a text file, if the username and password match.

  Implement a simple chat application in Python

You will implement a simple chat application in Python. The code for the chat client should be saved in chat.py

  Examine the month entered by the user

Examine the month entered by the user. If it is larger than 12 or smaller than 1 issue an error message and ask for input again.

  Write program to calculate the length of the hypotenuse

CIS156 Python Programming Assignment - Triangle Calculator, South Mountain Community College, USA. Write program to calculate the length of the hypotenuse

  Write a program that computes the circumference of a circle

Write a program that computes the circumference of a circle with a radius of 7.5 and prints out the result. The circumference is 2* pi * radius.

  ICT707 Data Science Practice Assignment

ICT707 Data Science Practice Assignment Help and Solution, University of the Sunshine Coast - Assessment Writing Service - implement a recommender system

  Calculate target heart rate during fitness training

CIS115-INTRODUCTION TO PROGRAMMING AND LOGIC-Write a program to calculate target heart rate during fitness training. This program has two functions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd