Codingassignmenthelper | Home Codingassignmenthelper | University

BN108 Assignment 2 Interactive programs

MELBOURNE INSTITUTE OF TECHNOLOGY

Assignment :

Assessment Details and Submission Guidelines

Trimester : T3 2019
Unit Code : BN108
Unit Title : Programming for Networking
Assessment Type : Individual
Assessment Title : Assignment 2 - Interactive programs
Purpose of the assessment (with ULO Mapping) : This assignment assesses the basic concepts of programming; students should be able to demonstrate their achievements in the following unit learning outcomes: Describe the fundamental principles of object-oriented programming; Interpret a user’s needs while dealing with simple program specifications; Design a simple class using UML notation; Create a simple application based on UML design and the incremental development process of coding, debugging, and testing; Apply basic control structures – sequence, repetition, and selection – to program development; Produce simple interactive applications. Weight : 25%
Total Marks : 50
Word limit : N/A
Submission Guidelines : All work must be submitted along with a completed Assignment Cover Page. The assignment must be in MS Word format, 1.5 spacing, 11-pt Calibri (Body) font and 2 cm margins on all four sides of your page with appropriate section headings. Reference sources must be cited in the text of the report, and listed appropriately at the end in a reference list using IEEE referencing style. Extension : If an extension of time to submit work is required, a Special Consideration Application must be submitted directly on AMS. You must submit this application three working days prior to the due date of the assignment. Further information is available at : www.mit.edu.au Academic Misconduct : Academic Misconduct is a serious offence. Depending on the seriousness of the case, penalties can vary from a written warning or zero marks to exclusion from the course or rescinding the degree. Students should make themselves familiar with the full policy and procedure available at : www.mit.edu.auFor further information, please refer to the Academic Integrity Section in your Unit Description.

Assignment Description :

This assignment will give you practice with interactive programs, if/else statements, collections, loops and functions.

Problem Description :

A small car yard dealing in second hand cars needs an application to keep records of cars in stock. Details of each car shall include registration(rego), model, color, price paid for the car (i.e. purchase price) and selling price. Selling price is calculated as purchased price plus mark-up of 30%. For example, Toyota Corolla bought for $20,000 will have the selling price of 20000 * (1 + 0.3) = 26000.

Task Requirements :

Imagine you have been invited to develop a menu driven python application to manage records of cars in stock. Based on the problem description, starter program (code template) has been provided. Investigate the provided starter program. There are four scripts(application.py, caryard.py, cars.py and vehicle.py). Driver function(main) is defined in the appliction.py, which imports caryard module(caryard.py). Caryard declares all the core functions (buy, sell, search, etc. …) for supporting the car yard business. The caryard module imports cars module(cars.py), and the cars module in turn imports the vehicle that include a definition of a Car class.
Program is executed by loading and running the application.py. The important work of interconnecting and wiring of modules and functions have been already been done. However, most of these functions, although declared and wired up in the program are not yet implemented. Your task is to implement these functions. There are eleven (11) tasks to be completed described next within the modules: application. Task 1 : implement menu ()
caryard.py Task 2 : implement buy_car () Task 3 : implement sell_car () Task 4 : implement search_car () Task 5 : implement list_all_cars ()
cars.py Task 6: implement addCar (rego, model, color, price) Task 7 : implement removeCar (rego) Task 8 : implement all_cars () Task 9 : implement search(rego)
vehicle.py Task 10 : implement the Car class Task 11 : UML model of a Car class

Description of Program functions :

Program displays a menu on execution. Five menu options are available to allow the user to buy, sell, search, show all cars, and exit program respectively. Program functionality and screen output for each of the menu option when selected by the user follows:

Program menu on execution:

Car Yard
1.Buy
2.Sell
3.Search
4.show All
5.Ouit

Your option[1-5] : 6
Invalid Option!Must be Between 1 and 5

your option[1-5]: |

Option 1 (Buy a car): User enters 1. Note the error message for duplicate car rego

Your option[1-5]:1
   Buy Car
----------------------------
Enter Rego:Y100
----------------------------
Duplicate rego.Enter new value
Enter Rego:Y400
Enter Model:BMW
Enter color:Blue
Enter price:80000
-----------------------------
Car added:BMW

To Continue Click Here > BN108 Assignment 2 Interactive programs.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home