首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代做ICS4U、代写 java 程序语言
项目预算:
开发周期:
发布时间:
要求地区:
ICS4U: Unit 3 – Object Oriented Programming
Assignment 3 – Car Rental System (CRS)
1. General Info
You are to help CIMP to write Car Rental System (CRS). The system will be used by the system’s employee so data will not be randomly entered by customers. It has the following functionalities
• Import existing cars from a textfile that contains all the cars’ info.
• Add a single car into the system manually.
• Display cars in the system. May filter the display:
o Displaysedansonly
o Displaycoupesonly
o Displaycrossoversonly o Displayconvertiblesonly o Displayallcars
• Rent cars
• Return cars
• Exit (leave the program)
2. Program Flow
Page 1 of 12
ICS4U: Unit 3 – Object Oriented Programming
3. User Interface a) Main Screen
b) Import Cars from File
After importing, we can see all cars.
Page 2 of 12
ICS4U: Unit 3 – Object Oriented Programming
c) Add Single Car
Adding a Sedan
Adding a coupe
Adding a Crossover
Page 3 of 12
ICS4U: Unit 3 – Object Oriented Programming Adding a Convertible
When displaying all cars, it shows the new cars:
d) Display Cars
We can display all cars
We can also display a spcifici type of car (Sedan in this case)
Page 4 of 12
ICS4U: Unit 3 – Object Oriented Programming
e) Rent Car
Let’s say we want to rent the car with Car-ID 1008
We will enter the information. If it satisfy all criteria, then it goes through
The rented car in the Display screen
I may rent another car
Here’s another car rented in the Display Screen
Page 5 of 12
ICS4U: Unit 3 – Object Oriented Programming
f) Return Cars
Let’s return 1008, which driving within the allowable distance (Allowable is 1250 km, shown in Display Screen)
After returning 1008, that row is clear. However it shows that the car’s mileage went up by 1000.
Now let’s return 1457, but drove more than allowable distance
Then it will calculate the penalty and show it on screen.
Page 6 of 12
ICS4U: Unit 3 – Object Oriented Programming
4. UML Diagram
Here’s the UML diagram of the program. Your program must follow the same structure.
Page 7 of 12
ICS4U: Unit 3 – Object Oriented Programming
5. Text File & Database
The program comes with a text file called CarList.txt, that contains some dummy car information. You may import it into the garage, so that you may test your program easily. The columns are separated by a colon “:”
Example of the textfile:
0:Honda:Civic:Good on Gas
1:Toyota:Supra:false
2:Mazda:CX-5:5
3:BMW:Z4:15.4
0:Toyota:Corolla:Top Safety
0:Audi:A4:Luxurious
1:Nissan:GT-R:false
1:BMW:440i:true
2:Lexus:GX460:8
3:Mazda:MX-5:7.6
Column 1: Column 2: Column 3: Column 4:
Note:
Car Type. Refer to Car class to see the values and their corresponding car type. Car maker. This is the company that makes the car
Car model. The name of the car.
The special information specific to a car type:
- Sedan
- Coupe
- Crossover
- Convertible
Special information about the car
If it contains back seats
Number of seats it has
Time to open the soft(or hard) top in seconds
The Car-ID is not in the textfile, because your program should automatically generate it when a new car is added.
Extra – For those who wants to understand the code inside Database.java (NOT REQUIRED): For more information on how to work with .txt using Java, please refer to the following websites:
• https://www.geeksforgeeks.org/different-ways-reading-text-file-java/ • https://www.javatpoint.com/java-bufferedwriter-class
6. More Information a) Database
The Database will store all of the Car objects in an array. We haven’t learnt how Array of Objects work, but assume it’s similar to storing any normal data type in an array.
b) Car ID (ID)
Each car will have a unique Car ID. Each new car going into the system will have a randomly generated ID assigned to them. The range is between 1000 – 1999, therefore only 999 cars can be stored into the system.
Page 8 of 12
ICS4U: Unit 3 – Object Oriented Programming
c) Different Car Types
The system only has 4 types of parcel: Sedan, Coupe, Crossover and Convertible
Each type has their own type specific Extra Info and formula in calculating the Allowable Distance and the Extra Distance Penalty Fee. Please refer to the following table:
Type Extra Info
Special Info – Describes what special features the sedan has.
If the coupe has a back seat or not.
The number of seats the Crossover has.
The time it takes (in seconds) to open/close the convertible top.
If the renter did not exceed the allowable distance, then there’s no fee. If it exceeds, here’s the table:
They are represented by an integer. May refer to Parcel class to find the values.
Sedan = 0 Coupe = 1 Crossover = 2 Convertible = 3
However, when displaying parcels in the table format, it is shown as:
Sedan = “SED” Coupe = “CPE” Crossover = “XOR” Convertible = “CVT”
Sedan
Coupe
Crossover
Convertible
Allowable Distance
Extra Distance Fee Formula
Type
Sedan
= ⌊
× 250⌋ • = 1.25 ×
Coupe
= ⌊
× 100⌋
Note: ⌊@⌋ system means round down to the nearest integer.
Has backseat:
= 74× +20
= 74× +35 =2× +25,%≤6
=2× +45,%=78
= 1 ×( ))+55,%>8 30
No backseat:
Crossover
= ⌊ ! × (
× 150)⌋
Convertible
if the car is being rented for less than 5 days, then
= 500
if the car is being rented for more than or equals to 5 days, then
= + 5
× 400,
And the renter will get 5 days bonus (Calculation doesn’t include the bonus 5 extra days)
= 2-...//(0123456789.): + (750 − 25.5 × sec) where ? = time in seconds to open/close top
Page 9 of 12
ICS4U: Unit 3 – Object Oriented Programming
7. Working with Date class
This assignment, you will be using the Date class and calculate the due date. The following are some links you will need to research a bit on yourself:
Parsing and Formatting Dates in Java
http://tutorials.jenkov.com/java-date-time/parsing-formatting-dates.html
Add days to current date
https://www.mkyong.com/java/java-how-to-add-days-to-current-date/
Convert Date to String
https://www.javatpoint.com/java-date-to-string
Convert String to Date
https://www.javatpoint.com/java-string-to-date
Constructors and Methods in Date class
https://www.tutorialspoint.com/java/java_date_time.htm
https://docs.oracle.com/javase/7/docs/api/java/util/Date.html
8. Requirements
• Do not change the Database class. If Database is changed and program cannot be compiled, then you will get zero.
• Must use the Database class to help you store and access the data. Read the JAVA DOCS (Comments) to help you understand how to use each method inside the Database class. Just understand the method header is enough. It is not necessary to understand what is happening inside each of the method.
• Program must follow the program flow chart and UML diagram.
• Do not create extra classes
• Do not create extra public methods (except helper methods in CRS class)
• Must complete all template methods and the main methods.
• Each class must be in its separate file to improve readability and maintainability.
• Do not use anything that’s not taught in Unit 1-3 (Eg: ArrayList, LinkedList, 2D-Array, etc.)
• Must create extra helper methods (Part of the marking scheme)
• Must follow Front-End and Back-End design. (Except DisplayCar() method in CRS)
• Must utilize Polymorphism correctly (Program may still work without using Polymorphism at all)
9. Error Checking
• Must check if options entered are valid.
• Must check if ID entered are valid (exist or not).
• Must check Car Type is valid
• Must check number of days is valid (positive)
• Must check distance is valid (0 or positive)
• Assume when creating a new car, Extra Info will always be valid values.
• Assume options entered will always be the correct data type (Eg: If the Scanner is expecting an int, I will
not enter a string)
• If user entered info is wrong, it will go back to the main screen. Program will NOT repeatedly ask for the
correct info.
Page 10 of 12
ICS4U: Unit 3 – Object Oriented Programming
10. Provided Templates and Files to Submit
Provided Code & Template
Files to submit
Do not submit the following
Car.java
Convertible.java Coupe.java
Crossover.java CRS.java
CRSMain.java
Database.java
Sedan.java
CarList.txt
Car.java
Convertible.java Coupe.java
Crossover.java CRS.java
CRSMain.java
Sedan.java
Database.java
CarList.txt
Any.class or.java~
11. Note
You may write as many or as little code. However, try to aim for my benchmark. My sample code (excluding Database.java) contains 869 lines of code
The templates contain a total of 235 lines of code already.
You just need to write 633 lines of code to complete this assignment.
Working with friends is highly encouraged, and may share ideas. However no sharing of code. There are
programs that can check the program’s similarity, and I can see who are copying programs.
Page 11 of 12
ICS4U: Unit 3 – Object Oriented Programming
12. Marking Scheme: Checklist
Knowledge
Items
Created and Used Methods correctly
Used Classes and Objects correctly
HaveInheritance
HaveEncapsulation
HavePolymorphism
Displayinfocorrectly
Program loops correctly between Menu and Screens Usedmaterialnotfromlesson
Application
Items
AddCar(Object)
RentCar() is working
ReturnCar() is working
DisplayCar() is working
DisplayCar(int) is working Usedmaterialnotfromlesson
Thinking
Your Mark
Out of 4
4
4
4
4
4
4 -14 28
Out of 5 12
9
1
3 -15 30
Out of 4
4
4 4 8 4 8 4 -20 40
Out of 4
4
4
4
4
4 24
Knowledge Total:
Application Total:
Your Mark
Your Mark
Items
Created Global Constant variables and used them correctly/efficiently
(minimum 5)
Created Non-1 Line Helper Methods and used them correctly/efficiently
(minimum 2)
Applied Inheritance Efficiently/Correctly
Applied Encapsulation Efficiently/Correctly
Applied Polymorphism Efficiently/Correctly
Followed UML diagram design
Followed Frontend & Backend Design
Check invalid input
Used material not from lesson
Communication
Items
HaveJAVADOCforHelperMethodsthatyoucreated Correct Method & Variable naming convention
Comments in code
CodeIndentation
ClearUserInterface
Appropriatewarningmessages
Thinking Total:
Communication Total: PERCENTAGE:
Your Mark
Comments
•
Page 12 of 12
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做 program、代写 c++设计程...
2024-12-23
comp2012j 代写、代做 java 设...
2024-12-23
代做 data 编程、代写 python/...
2024-12-23
代做en.553.413-613 applied s...
2024-12-23
代做steady-state analvsis代做...
2024-12-23
代写photo essay of a deciduo...
2024-12-23
代写gpa analyzer调试c/c++语言
2024-12-23
代做comp 330 (fall 2024): as...
2024-12-23
代写pstat 160a fall 2024 - a...
2024-12-23
代做pstat 160a: stochastic p...
2024-12-23
代做7ssgn110 environmental d...
2024-12-23
代做compsci 4039 programming...
2024-12-23
代做lab exercise 8: dictiona...
2024-12-23
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!