FIT9136 Algorithms and Programming Foundations in Python Assignment 2
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
FIT9136 Algorithms and Programming Foundations in Python
Assignment 2
1. Key Information
Purpose |
This assignment will develop your skills in designing, constructing, testing, and documenting a Python program according to specific programming standards. This assessment is related to the following learning outcome (LO): ● LO2 - Restructure a computational program into manageable units of modules and classes using the object-oriented methodology ● LO3 - Demonstrate Input/Output strategies in a Python application and apply appropriate testing and exception handling techniques |
Your task |
This assignment is an individual task where you will work independently. Your task is to develop a simple car purchase advisor system using Python code, based on the provided specifications. |
Value |
45% of your total marks for the unit. |
Due Date |
Friday, 22 September 2023, 4:30 PM (AEST) |
Submission |
● Via Moodle Assignment Submission. ● FIT GitLab check-ins will be used to assess the history of development ● JPlag will be used for similarity checking of all submissions. |
Assessment Criteria |
This assessment includes a compulsory interview with your tutor following the submission date. At the interview you will be asked to explain your code/design/testing, modify your code, and discuss your design decisions and alternatives. Marks will not be awarded for any section of code/design/functionality that you cannot explain satisfactorily. Failure to attend the interview will result in your assessment not being marked. You will be provided with the timing of the interviews at a later date. The following aspects will be assessed: 1. Program functionality in accordance to the requirements 2. Code Architecture and Adherence to Python coding standards 3. The comprehensiveness of documented code |
Late Penalties |
● 10% deduction per calendar day or part thereof for up to one week ● Submissions more than 7 calendar days after the due date will receive a mark of zero (0) and no assessment feedback will be provided. |
Support Resources |
See Moodle Assessment page and Section 8 in this document |
Feedback |
Feedback will be provided on student work via ● general cohort performance ● specific student feedback ten working days post submission |
For this assignment, your goal is to create a Car Purchase Advisor System that utilises files "stock.txt" and “order.txt” located in the "data" folder. The application will feature a text interface to act as the advisor system for a car retailer. The functionalities include:
Functionality 1:
When the program starts, test data needs to be automatically generated. The generated test data needs to be reflected in the “stock.txt” file and also loaded in the program memory. For the format of the test data, you can refer to the provided example “stock.txt”. Please ensure that the test data presents a certain degree of randomness.
Functionality 2:
After generating the test data, a menu should be presented to the user with the following options:
a) Look for the nearest car retailer
b) Get car purchase advice
c) Place a car order
d) Exit
Functionality 3:
If the user selects the option for checking the nearest car retailer, the program should ask for the user ’s postcode to identify the nearest car retailer (here we assume that suburbs with smaller differences in postcodes are geographically closer, for more information please refer to section 2.3.6).
Functionality 4:
If the user selects the option for getting car purchase advice, the program needs to:
a) First list all the available car retailers and prompt the users to select one to continue the advising process;
b) Then show a sub-menu with the following options:
i) Recommend a car
ii) Get all cars in stock
iii) Get cars in stock by car types (the car types is a list of strings, e.g., [“AWD”, “RWD”])
iv) Get probationary licence permitted cars in stock
c) The option i) should randomly select one car from the current stock of the car retailer, the options ii) to iv) should show the current stock of a car retailer. You need to first print the retailer ID and the retailer name, and also ensure that the printed stocked cars are well-formatted.
Functionality 5:
If the user selects the option for placing a car order, the program should ask for the retailer ID and the car ID from the user separated by a space. However, before placing the order, the program needs to check whether the current time is within the business hours of the target retailer. If not, an order should not be created and a message should be prompted to the user. For any other invalid cases, you need to handle them properly. Otherwise, in valid cases, an order should be created and stored in “order.txt” and the order details should be printed to the user.
Please note that the program will continue to run until the user chooses to exit the application.
To develop this application, you will need to create four classes, each defined in a separate Python file (i.e. *.py), and one main Python file to execute the program. All the required files can be found in the RENAME_ME.zip file, which is located in the Assessments section on Moodle. It is important to note that the addition of supplementary classes exceeding the prescribed four may incur a penalty in the form of mark deduction.
Contains all the operations related to a car. |
|||||||||||||
Required Class Variables |
● N/A (You can add if you need) |
||||||||||||
Required Methods |
*All arguments of the constructor must have a default value.
|
Note: ● A car with a Power to Mass ratio greater than 130 kilowatt per tonne is a prohibited vehicle for probationary licence drivers ● The formula to calculate the Power to Mass ratio is: weight(Round)of(up)og(ow)r(a) |
2023-09-02