Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

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:

Python Programming

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: 1. application.py Task 1: implement menu ()

2. caryard.py Task 2: implement buy_car () Task 3: implement sell_car () Task 4: implement search_car () Task 5: implement list_all_cars ()

3. 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)

4. 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: Option 1 (Buy a car): User enters 1. Note the error message for duplicate car rego Option 2 (Sell a car): User enters 2. Note the error message for invalid car rego, and the sell price which is a (30%) mark-up of purchase price. Option 3 (Search): User enters 3 Option 4 (Show all): User enters 4 Option 5 (Exit Program): User enters 5

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

How does a multiport repeater / hub function on a network?

Answered: 1 week ago