There can be multiple cars with the same model and manufacturer.

The status of a car in the system may have one of the three values : “reserved”

“checked out”

“available”

A user can reserve a car or rent a car without a previous reservation. A user is not allowed to have more than one car rented at a time. Only after canceling a reservation or returning a rented car, can a user can reserve or rent another car.

The reservation process is automatic, and does not require an admin to approve requests. If the status of a car is “available” and a user rents it, the status of that car immediately transitions to “reserved”. But an admin can edit the reservation later.

When a reservation is made, it must specify the time that the car is to be picked up (“checked out”) and returned. In order to simulate checkout and returns actions in the real world, there should be buttons that a user can manually click to indicate that a car has been checked out or returned.

The minimum rental period is 1 hour and the maximum is 10 hours. The system should cancel a reservation if a user doesn’t check out a car in time. The time elasticity is 30 minutes after the pickup time. For example, if a user reserved a car to pick up at 3:00pm, if the car was not checked out by 3:31pm, then the car should become “available” again.

If a user doesn’t return a car on the date promised when it was checked out, the system will sent a notification (e.g. system message) to the user and automatically change the car status to “available”.

A user can only reserve a car 7 days in the future.

A user can return a car before the specified return time by clicking the “return” button. If a user does this, then the car should become “available”.

There’s no elasticity in the return time. If the user doesn’t return the car in time (at the specified return time), the car will automatically become “available” and other users can check out this car. For example, user A reserves a car from 2pm to 4pm, user B reserves the same car from 4pm to 6pm. If A doesn’t return the car at 4pm, the system should automatically change the car status to “reserved” and user B can click “check out” button to pick up the car. If no user has reserved this car at 4pm, then the car should automatically become “available”.

There’s no penalty when a user doesn’t return a car. This app just has a simple payment system. A penalty would only make the calculation more complex.

The rental charge in user profile is not a deposit. It’s the total fee for the previous successful rental. The system doesn’t need to check if a user has enough on deposit to check out a car because there’s no deposit in this app.

java上机实验作业 编写汽车类car,Java代写:CS103 Car Rental代做留学生SQL实验作业...相关推荐

  1. java上机实验作业 编写汽车类car_JAVA第十四次上机作业

    1.(1)定义一个汽车类Vehicle,要求如下:(知识点:类的继承 方法的覆盖) (a)属性包括:汽车品牌brand(String类型).颜色color(String类型)和速度speed(doub ...

  2. java上机实验作业 编写汽车类car_请问如何用Java编写一个汽车类Car

    展开全部 public class Car { private String color;//颜色 private inte69da5e6ba90323131333532363134313032313 ...

  3. (OJ)Java面向对象-编写汽车类

    编写汽车类 Problem Description 1.实验目的(1) 熟悉类的创建方法(2) 掌握对象的声明与创建(3) 能利用面向对象的思想解决一般问题2.实验内容 编写一个java程序,设计一个 ...

  4. Python编写汽车类

    Python编写汽车类 编写程序并测试,有一个汽车类 Vehicle,类中的私有数据成员为车轮个数 wheels 和车重 weight:小车类 Car 是汽车类 vehicle 派生类,其中包含载客人 ...

  5. Java 7:如何编写非常快速的Java代码

    当我第一次写此博客时,我的目的是向您介绍ThreadLocalRandom类,它是Java 7中新增的用于生成随机数的类. 我已在一系列微基准测试中分析了ThreadLocalRandom的性能,以了 ...

  6. COMP 3023 国外作业代写、C++ - Assignment代写、代做留学生Software Development程序作业、代做C/C++作业...

    COMP 3023 国外作业代写.C++ - Assignment代写.代做留学生Software Development程序作业.代做C/C++作业 Revision 1 COMP 3023 Sof ...

  7. Java实验一—编写电视类TV

    (仅记录自己的学习之路) 编写电视类TV,UML类图和说明如下: 注意: (1)电视只有在打开的状态下才可以调音量和设置新频道: (2)设置音量和频道时,应该在规定的范围,如音量值为1-7. 解题要求 ...

  8. Java学习之设计一个汽车类Auto,其中包含一个表示速度的double型成员变量speed和表示启动的start()方法、表示加速的speedUp()方法以及表示停止的stop()方法。

    案例介绍: 请设计一个汽车类Auto,其中包含一个表示速度的double刑的成员恋量speed,表示启动的start()方法.表示加速的speedUp()方法以及表示停止的 stop()方法.再设计一 ...

  9. java中equals函数所在的类,重写Java中的equals方法介绍

    Java中,只有8种基本类型不是对象,例如:4种整形类型(byte, short, int,long),2种浮点类型(flout, double),boolean, char不是对象,其他的所有类型, ...

最新文章

  1. fb50 sap 报记账码未定义_SAP隐秘的角落:记账代码Posting Key
  2. Rhythmk 学习 Hibernate 02 - Hibernate 之 瞬时状态 离线状态 持久化状态 三状态
  3. java序列化与反序列化(转)
  4. Linux破解系统管理员密码
  5. 接oracle私活价格,也来记录一下第一次接私活的体验
  6. linux检查nginx 状态,Nginx配置检测服务状态的实现方法,
  7. C语言学习笔记-7.函数
  8. 服装企业IT管理 应该这样当
  9. 关于win10专业版无法下载暴雪战网的解决方案
  10. 《JavaSE-第七章》之抽象的类-实例的对象-合理的封装
  11. VLink的简单验证过程
  12. bzoj2668 [cqoi2012]交换棋子
  13. eclipse中怎么快速切换窗口?
  14. 二分法实例应用(一)
  15. QuickBI和DataV 1
  16. 【基于MAX78000的智能边缘应用设计大赛】
  17. 计算机操作系统pv实验,计算机操作系统PV操作例题.doc
  18. 9.数据中台 --- 数据服务体系建设
  19. 关于新版idea如何导入项目
  20. checksum mysql_checksum

热门文章

  1. 在ubantu下安装搜狗
  2. latex 大于等于_Latex使用时的小技巧
  3. 《满族姓氏寻根大全·满族老姓全录》
  4. matlab解决阻尼牛顿,matlab阻尼牛顿法例题
  5. 转:sql server 中的汉字转化为拼音
  6. python爬虫论文参考文献格式_Python爬虫进阶必备 | XX文学加密分析实例
  7. orcad的噪声分析
  8. (转载)7 .24张小龙内部讲座《通过微信谈产品》完整版
  9. WiredTiger系列2:Eviction详解
  10. VC++玩转Native Wifi API