28 CT XXXXXXXXXXPYPIndividual Assignment ONLINE CAR RENTAL SYSTEM (OCRS) SUPER CAR RENTAL SERVICES (SCRS) is one of the fast-growing Online Car Rental Service in Malaysia which help customer to save...

1 answer below »
Python Assignment-Car Rental System


28 CT108-3-1-PYPIndividual Assignment ONLINE CAR RENTAL SYSTEM (OCRS) SUPER CAR RENTAL SERVICES (SCRS) is one of the fast-growing Online Car Rental Service in Malaysia which help customer to save their time by booking rental cars online from their place. SCRS decided to enhance their online Car Rental booking services by allowing customers to book cars for rent, online. SCRS requires you to develop Python program for the OCRS which have 3 type of users and should contains features stated below: Functionalities of Admin i. Login to Access System. ii. Add Car with details, to be rented out. iii. Modify Car Details iv. Display All records of a. Cars available for Rent b. Customer Payment for a specific time duration v. Search Specific record of a. Specific Car Booking b. Specific Customer Payment vi. Return a Rented Car. vii. Exit Functionalities of All Customers (Registered / Not-Registered) i. View all cars available for rent. ii. New customer Register to Access other Details iii. Exit Functionalities of Registered Customer i. Login to Access System ii. View Personal Rental History. iii. View Detail of Cars to be Rented Out. iv. Select and Book a car for a specific duration. v. Do payment to confirm Booking. vi. Exit 1.0 REQUIREMENTS i. You are required to carry out extra research for your system and document any logical assumptions you made after the research. ii. Your program should use symbolic constants where appropriate. Validations need to be included to ensure the accuracy of the system. State any assumptions that you make under each function. iii. You are required to store all data in text files. There is no limit on the number of text files that can be used but they should be kept minimum. iv. You are expected to use list and functions in your program. Your program must embrace modular programming technique and should be menu-driven. v. You may include any extra features which you may feel relevant and that add value to the system. vi. There should be no need for graphics in your program, as what is being assessed, is your programming skill not the interface design. The marking scheme for the assignment has been provided so that you clearly know how the assessment for this assignment would be done. vii. You should include the good programming practice such as comments, variable naming conventions and indentation. viii. In a situation where a student: 0. Failed to attempt the assignment demonstration, overall marks awarded for the assignment will be adjusted to 50% of the overall existing marks. 0. Found to be involved plagiarism, the offence and will be dealt in accordance to APU regulations on plagiarism. ix. You are required to use Python programming language to implement the solution. Use of any other language like C/C++/Java is not allowed. x. Global variables, build in functions like min, max, sort, and search are not allowed. 2.0 DELIVERABLES You are required to submit a softcopy of: i. Program coded in Python – submitted as .py file. · Name the file under your name and TP number (e.g. KATHY_SIERRA_TP123456.py) · Start the first two lines in your program by typing your name and TP number (e.g. as follows): #KATHY SIERRA #TP123456 ii. Text files created through test data – submitted as .txt files. iii. A documentation of the system – submitted as NAME_TPNUMBER.pdf file - that incorporates basic documentation standards such as header and footer, page numbering and includes: · Cover page · Table of contents · Introduction and assumptions · Design of the program – using pseudocode and flowcharts – which adheres to the requirements provided above · Program source code with explanation · Additional features source code with explanation · Screenshots of sample input/output with explanation · Conclusion · References using Harvard Name Referencing 3.0 ASSESSMENT CRITERIA i. Design (Pseudocode and Flowchart)30% Detailed, logical and accurate design of programmable solution. ii. Coding / Implementation (Python code)30% Application of Python programming techniques (from basic to advance); good programming practices in implementing the solution as per design; and adequate validation meeting all system requirements with all possible additional features. iii. Documentation25% Adherence to document standard format and structure; screen captures of input/output with explanation; and inclusion of generated text files. iv. Demonstration15% Ability to run, trace code, explain work done and answer questions. 4.0 PERFORMANCE CRITERIA Distinction (80% and above) This grade will be assigned to work which meets all of the requirements stated in the question. The program runs smoothly when executed. There is clear evidence and application of Python concepts up to advanced level. The program solution is unique with excellent coding styles and validation. The program implemented maps completely against the design (pseudocode and flowchart) as seen in the documentation. The design of the solution varies in styles and has unique logic with hardly any errors / omissions. The documentation does not have any missing components. Sample inputs/outputs documented have clear explanation. Student must be able to provide excellent explanation of the codes and work done, show additional concepts / new ideas used in the solution, able to answer all questions posed with accurate / logical answers / explanation provided with sound arguments and clear discussion. Overall an excellent piece of work submitted. Credit (65%-74%) This grade will be assigned to work which is considered to be of good standard and meets most of the requirements stated in the question. The program runs smoothly when executed. There is clear evidence and application of Python concepts up to at least intermediate level. The program solution is unique with good coding styles and validation. The program implemented maps well against the design (pseudocode and flowchart) as seen in the documentation. The design of the solution varies in styles and has unique logic with minor errors / omissions. The documentation does not have any missing components. Sample inputs/outputs documented with some explanation. Student must be able to provide good explanation of the codes and work done, answer most questions posed with mostly accurate / logical answers / explanation. Overall a good assignment submitted. Pass (50%-64%) This grade will be assigned to work which meets at least half of the basic requirements (approximately 50%) stated in the questions. The program runs smoothly when executed. There is clear evidence and application of Python concepts at basic level. The program solution is common with basic coding styles and validation. The program implemented somewhat maps with the design (pseudocode and flowchart) as seen in the documentation. The design of the solution is average in terms of logic and style with some errors / omissions. The documentation has some missing components. Sample inputs/outputs documented but without any explanation. Student must be able to explain some codes and work done and able to answer some questions posed with some accurate / logical answers / explanation. Overall an average piece of work submitted. Fail (Below 50%) This grade will be assigned to work which achieved less than half of the requirements stated in the question. The program is able to compile but not able to execute or with major errors. The program solution has only basic coding styles with no validation. The program solution has little or no mapping with the design. The design of the solution has major / obvious errors / omissions. The documentation has some missing essential components. Student is barely able to explain the codes / work done and answer given on the questions posed but with mostly inaccurate / illogical answers / explanation. Overall a poor piece of work submitted. Level 1 Asia Pacific University of Technology and Innovation 2021 Requirements: 1. The code needs to be all in main.py 2. No global variables are allowed 3. No arrays are allowed, use lists instead 4. Must follow the menu stated in the doc 5. Cant use classes, we didnt learn it, this is a beginner class for python 6. SQL or django or others are not allowed to be used. Ive done half of the code, however i need unique id for customer and cars, but im stuck for certain functions because im not sure how to do those. Theres 3 users, admin, unregistered customer and registered customer. Im also using text files to keep all my data. You can add as many text files as you want. Specific time duration in my assignment doc means the date. For Admin's menu, ive done 1,2 and 3.a For Unregistered customer's menu, ive done all that needs to be done in the menu For registered customer's menu, ive done only 2 and 5. For admin's menu: 3. b display ALL records of customer payment can be:- Ely's record payment: $200 for 3 days rented 4. a Search specific record of car booking can be:- Select Car id: 1 Car id 1 is booked for customer user Ely. 4. b Search customer payment can be:- Select Customer id: 1 Customer id 1, Ely has payed $200 for car id 1 for 3 days rented 5. Return a Rented car can be:- Car id: 1 Customer id 1, Ely has returned rented car id 1 For registered customer's menu: 1. Personal rental history can be:- ****** Ely's rental history ****** 1. Car ID: 1, Type: SUV, Brand: Honda, Color: Red, Year: 2013 3. Booking cars can be:- (Displaying all available cars) Select Car for booking: 1 Please input start date (Year-Month-Date): 2021-02-01 Please input end date (Year-Month-Date): 2021-02-04 Car has successfully been booked, the payment will be $200. 4. Payment and Confirmation of Booking can be:- Car ID: 1, Type: SUV, Brand: Honda, Color: Red, Year: 2013 Selected car has been booked, please pay to confirm booking: $200 main.py:- import datetime def main(): time = datetime.datetime.now() print(""" _______ // ||\ \\ _____//___||_\ \___ ) _
Answered 3 days AfterJun 11, 2021

Answer To: 28 CT XXXXXXXXXXPYPIndividual Assignment ONLINE CAR RENTAL SYSTEM (OCRS) SUPER CAR RENTAL SERVICES...

Rushendra answered on Jun 15 2021
141 Votes
py_code/.pytest_cache/.gitignore
# Created by pytest automatically.
*
py_code/.pytest_cache/CACHEDIR.TAG
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by pytest.
# For information about cache directory tags, see:
#    http://www.bford.info/cachedir/spec.html
py_code/.pytest_cache/README.md
# pytest c
ache directory #
This directory contains data from the pytest's cache plugin,
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
**Do not** commit this to version control.
See [the docs](https://docs.pytest.org/en/stable/cache.html) for more information.
py_code/.pytest_cache/v/cache/stepwise
[]
py_code/.vscode/settings.json
{
"python.testing.pytestArgs": [
"."
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.unittestArgs": [
"-v",
"-s",
".",
"-p",
"*_test.py"
]
}
py_code/Admin_Data.txt
bob:123
dave:ch123
py_code/DisplayCars_Data.txt
SUV:Honda:Red:2013:70
suv:nissan:red:2010:30
Sports:Lamborghini:Yellow:2015:40
SUV:Honda:White:2019:30
py_code/main.py
import datetime
def main():
time = datetime.datetime.now()
print("""
_______
// ||\ \\
_____//___||_\ \___
) _ _ \\
|_/ \________/ \___|
___\_/________\_/______
""")
print("\n\tWELCOME TO CAR RENTAL SHOP!\n")
print(f"\tCurrent date and time: {time}")
while True:
print("""
******** Car Rental Shop ********
1. Admin
2. Unregistered Customer
3. Registered Customer
4. Exit the program
""")
try:
choice = int(input("Enter your choice: "))
except ValueError:
print("Please enter a number!")
continue
if choice == 1:
admin()
elif choice == 2:
unregistered_function()
elif choice == 3:
registered_function()
elif choice == 4:
break
else:
print("Please enter a choice between 1-4 only!")
def login(user, password, elevated):
with open("User_Data.txt" if not elevated else "Admin_Data.txt", "r") as text:
print("%s Login ********" % ("******** Admin" if elevated else "******** User"))
for record in text:
recordList = record.rstrip().split(":")
if user.lower() in recordList[0].lower() and password in recordList[1]:
print("Welcome, %s" % user)
return True
print("Error! Wrong username or password")
return False
def admin():
nValue = input("Enter username: ")
pValue = input("Enter password: ")
if login(nValue, pValue, True):
admin_function()
def searchCarBooking():
f=False
x=int(input("Enter id"))
for i in list_customer_cars:
if(i.id==x):
f=True
i.display()
if(f==False):
print("No record Found")
def searchCarPayment():
f=False
x=int(input("Enter id"))
for i in list_customer_cars:
if(i.id==x and i.confirm==True):
f=True
i.display()
if(f==False):
print("No record Found")
def admin_function():
while True:
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here