INF4002 Introduction to Programming
Introduction to Programming
INF4002 Introduction to Programming
Car Sales Assessment
Introduction
You should spend 3 hours on this assessment. It is ‘open book’ examination which means:
• Your submissions must entirely be your own. However, you can refer to your notes, textbooks and online
sources for information
• You must not communicate with anyone else about this assessment – online or face-to-face
This is worth 90% of the module’s overall grade, the other 10% being the Weekly Tasks
Aim
To create a software applications written in Python to support the activities of a company which sells cars. This
company needs an application to allow administration staff to enter details about the cars it sells, the cost of each
car and price of each car. Furthermore, the administration staff need to view the data held and to know the value of
all cars held.
Important
This is a prototype. There is no need to persistently store or save data added. It is only stored when the application is
running – when the application closes, all product and stock details are lost.
Assessment
The assessment is in three parts. Each part creates a different version of the Car Sales application
• Part 1 (40 marks): written in Python using functions
• Part 2 (40 marks): written in Python using the previously introduced Object template class and ObjectList
template class. The additional methods needed for these classes can be based on the Part 1 functions (but
don’t have to be)
• Part 3 (20 marks): written in Python using the Gui template class. The additional methods and classes can be
based on the Part 2 methods and classes (but don’t have to be)
Testing
The application should meet the requirements specified for each part. Furthermore, it should allow an
administrative staff to enter the following data:
Car Registration No: B5PHS
Car make: Toyota
Car model: Prius
Car price: 23000
Car cost: 21500
Car Registration No: WD69LCU
Car make: Volkswagen
Car model: Up!
Car price: 13000
Car cost: 9005
Car Registration No: TNA343K
Car make: Honda
Car model: Jazz
Car price: 15500
Car cost: 14660
Car Registration No: TT20UTR
Car make: Ford
Car model: Focus
Car price: 18982
Car cost: 17883
The total value of all stock (potential profit) is £7434
Part 1 (40 marks)
Write and test a Python application which contains a set of reusable functions that enable a user to enter a new car,
display all cars previously entered and display the potential profit on all stock. The profit on a single car is its price
minus its cost. The potential profit on all stock is the profit made if all cars were sold at their price.
Part 2 (40 marks)
Using some or most of the code produced in Part 1, write and test a Python application which incorporates the
Object template class and the ObjectList template class found in INF4002 Blackboard Exams folder and enables a
user to enter a new car, display all cars previously entered and display the potential profit on all stock
Part 3 (20 marks)
Using some or most of the code produced in Part 2, write and test a Python application which incorporates the
Object template class, the ObjectList template class and the GUI template class found in INF4002 Blackboard Exams
folder and enables a user to enter a new car, display all cars previously entered and display the potential profit on all
stock
The application GUI should look like this when the above data is added by a user:
Submission
1. Create a folder which has a name which is identical to your registration number
2. Inside the folder which has the same name as your registration number create three more folders entitled
part_1, part_2 and part_3
3. Into the folders part_1, part_2 and part_3 place the code produced for tasks Part 1, Part 2 and Part 3
respectively.
4. The code in the folders part_1, part_2 and part_3 should work as specified above and independently from
the code in the other folders.
5. Zip-up the folder with the same name as your University Registration number (and containing the folders
part_1, part_2 and part_3) and save the zip file somewhere safe
6. Submit your zip file to the appropriate Turnitin link in INF4002 Blackboard
7. Create and save (anywhere) a MS Word document with the same file name as your registration number
8. Into this MS Word document copy the code for Part 1, Part 2 and Part 3. This must be identical code to the
code submitted to Turnitin as a zip file above *
9. Save a MS Word document (anywhere safe) with the same name as your University Registration number
10. Submit MS Word document to the appropriate Turnitin link in INF4002 Blackboard
11. You should receive two Turnitin email digital receipts … one for each submission. Keep these safe.
* If the code is different, you may be referred to the Unfair Means Officer
Marking Scheme
Part 1 (40 marks)
20 marks: The functions and application work as specified above
10 marks: Appropriate checking of user input is conducted
5 marks: Appropriate checking of parameters is conducted
5 marks: Code is written which adheres to the standards promoted in INF4002
Part 2 (40 marks)
10 marks: The application works as specified
10 marks: Appropriate checking of user input is conducted
5 marks: Correctly uses the code written and tested in Part 1
5 marks: Code is written which adheres to the standards promoted in INF4002
5 marks: The Object and ObjectList template classes have been used appropriately *
5 marks: The code is appropriately commented
Part 3 (20 marks)
10 marks: The application works and looks as specified
5 marks: Correctly uses the code written and tested in Part 2
5 marks: The GUI template class has been used appropriately *
* Failure to use the specified template class[es] may result in a grade of zero for this part of the assessment