Program a management system in Python for a small car rental company

PROJECT

Your task is to program a management system in Python for a small car rental company.

Files

Your system will rely on four text files that contain the data needed to run the company. You can find models of these files in Moodle under “Files for project.” The idea is that while running your program, the content of these files will change. If you manage to corrupt the content of your files, you can always start again by downloading the files from Moodle.

vehicles.txt: This file contains information about the cars that the company owns. The details of each car are provided in a single row. Rows look like this:

AMG-111,Toyota Yaris,65,Air Conditioning,Hybrid,Automatic Transmission

The data is given in comma-separated form. First, there is the registration plate number (AMG-111), which identifies the car. Then, there is the model of the car (Toyota Yaris). The number following the model (65) is the daily rate of this car. This information is needed when the rental price is computed. After that, come the properties: Air Conditioning, Hybrid, Automatic Transmission. There can be several properties, but always at least one. Different properties are separated by a comma. The newline symbol "\n" ends each row in every file. The content of this file does not change, your program should only read information from it.

customers.txt: This file contains information about the clients who rent cars. The details of each client are provided in a single line, with different values separated by commas. A line looks like this: 09/09/1999,Tom,Shark,Tom.Shark@gmail.com First, there is the birthdate (09/09/1999), which serves as the identifier of the customer. There cannot be two customers with the same birthdate. Of course, this is not a realistic assumption, but in our "small world", this assumption holds. Next are the person’s first name (Tom) and last name (Shark). The fourth value is the customer’s email address (Tom.Shark@gmail.com). The content of this file may change: if a new customer rents a car, their information is appended to the file. Customers are never removed. rentedVehicles.txt: This file contains information about the rented vehicles. Each row looks like this: CHF-337,22/02/1961,25/10/2024 12:33 First, there is the register plate number (CHF-337) of the rented car, followed by the birthdate (17/08/1978) of the customer who rented the car. The third value is the time (25/10/2024 12:33) when the rental started. The three values are separated by commas. The content of this file may change in two ways: (a) When a car is rented, a new line is appended to the file; (b) When a car is returned, the corresponding line is removed from the file. The file contains only "open" rentals.

transActions.txt: This file contains information about “ended” rentals. Each transaction is on its own line, and a line looks like this:

BMC-69,17/04/1997,15/10/2024 14:01,19/10/2024 22:20,5,210.00

First, there is the register plate number (BMC-69) of the rented car, followed by the birthdate (17/04/1997) of the customer who rented the car. The third value is the time (15/10/2024 14:01) when the rental started, followed by the time (19/10/2024 22:20) when the car was returned. The fourth value is the duration in days (5). Note that each starting day is billed as a rental day. The last value is the price (210.00) of the rental, using two decimal places. When a car is returned and the price is computed, the corresponding information is appended to this file

Operation of the system

The program needs to be menu-based. The operation of the program is described in the following five videos:

Video 1: Menu

Video 2: List available cars

Video 3: Rent a car

Video 4: Rent a car, returning customer

Video 5: Return a car

Video 6: Count the money

Submission

The project must be submitted to CodeGrade by the deadline 2024-11-18 23:59. There is no autograde, but CodeGrade will perform some checks, which include:

Files check: Exactly two files must be submitted. The file project.py should contain the Python code of the project, and ai.txt describes what AI tools (if any) are used in this project and how.

Code structure check: This test checks that only structures taught in the course are used.

After you have submitted your files, please press the button: "Click here to see the Final Result for your submission".

If you see the text: "Your submission has successfully passed the preliminary tests. Next, the Teaching Assistant (TA) will review and grade your project by December 2nd", then everything is in order.

If your work does not pass the preliminary test, you will see the message: "Unfortunately, your submission did not pass the preliminary tests. Please review the feedback, make the necessary corrections, and resubmit your project. The Teaching Assistant (TA) will be able to review it only after all tests are passed." Note that you can resubmit as many times as you want until the deadline. However, each submission needs to contain two files.

If you do not pass the preliminary tests by the deadline, your project will be rejected in this round.

Declaration of AI usage

The file ai.txt needs to list the following:

Name all AI systems that were used in the development of the project work, and for each

Explain how and where they were used, or

Clearly state that no AI assistance or tools were used in this assignment.

This ai.txt is mandatory part of the submission and leaving it out means that the work is incomplete and is not graded.

Grading

TAs will review the works. You can see your grade and comments given by the TA in the Feedback section of your submission.

The grade is determined by the following table:

| Points | Grade

| >= 50 | 1|

| >= 60 | 2 |
|>= 70| 3 |
| >= 80 | 4|
| >= 90| 5|

The maximum number of points is 100. If you score less than 50 points, your project is rejected in the first round. TAs will grade the work according to a checklist containing the essential features of the program.

Resubmission

Rejected projects must be corrected/completed and resubmitted by 9/12.

The maximum grade for resubmitted projects is 3.

Projects that received a grade of 1 or 2 in the first round can also be resubmitted.

Plagiarism

Plagiarism is the act of presenting someone else's work, ideas, code, or solutions as your own without providing proper credit.

Plagiarism is considered unethical and a violation of academic or professional integrity.

All projects are carefully examined using CodeGrade's plagiarism detection tool, which compares each submitted work against all other projects."

Note that renaming variables and functions does not mislead plagiarism detection.

If plagiarism is detected, the project work is rejected in this round, and the authorities at LUT are promptly notified.

As the system cannot determine the origin of the copied content, all submissions with high plagiarism score are treated equally and rejected in that round.

Last modified: Tuesday, 29 October 2024, 8:40 AM

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,454评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,553评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,921评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,648评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,770评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,950评论 1 291
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,090评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,817评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,275评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,592评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,724评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,409评论 4 333
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,052评论 3 316
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,815评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,043评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,503评论 2 361
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,627评论 2 350

推荐阅读更多精彩内容