首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写CS2312、代做Java编程语言
项目预算:
开发周期:
发布时间:
要求地区:
Assignment CS2312 Problem Solving and Programming (2024/2025 Semester A) | www.cs.cityu.edu.hk/~helena
- 1 -
Assignment - Equipment Sets and Loan System
[ Weight: 15 marks out of the final mark of this course ]
Deadline: Dec 06, 2024 (Friday of revision week)
For late submissions, 20% of your original marks will be deducted if you hand in 1-day late (i.e. on Dec 07),
40% for 2-days (i.e. on Dec 08). Assignments handed on or after Dec 09 will get zero mark.
Academic dishonesty is strictly prohibited. The principle concerns whether students get their deserved marks
and do not intend to cause unfairness. Dishonesty also involves when one let others have a chance to copy
his/her code,
Grading:
Students must obtain the following results in sequence:
Phase 1 (>50% correct in PASS) ==> Phase 2 (>70% correct in PASS) ==> Phase 3
If you can finish Phase 1 with good programming styles + OO programming skills => up to B+
If you can finish Phase 2 with good programming styles + OO programming skills => up to A-
If you can finish Phase 3 with good programming styles + OO programming skills => up to A+
Various test cases are used for each phase (e.g. Phase 1: 1a.txt, 1b.txt, etc..). If you get partial correct, your
work is still considered. E.g. If you can pass 1a.txt – 1b.txt only, your grade may be up to C+.
For "Good Programming Styles", note that proper indentations, code-layout formatting, proper, meaningful
naming, well-designed classes, methods, fields are more important than writing comments.
During manual marking (Dec 07-21), selected students will be asked to meet me for discussion of your work.
Note:
Please apply what you learn from Lab08 - Lab10. You may reuse the code that you worked for Lab08 – Lab10.
Reusing these codes would not be considered as plagiarism.
Please first finish your program for Lab09, then modify and add the required functionalities for this Assignment.
Assignment Description
Extend the Lab09‐Q2 program to allow adding equipment, borrow equipment, and reserve equipment.
The club owns a collection of equipment. For any given equipment, multiple sets are available. The club
members can borrow or reserve depending on availability of the equipment sets.
1. For proper modelling of the system, you should revise the existing classes and add new classes,
including the following:
- Add two classes, Equipment and EquipmentSet, for the equipment types and the sets of equipment
correspondingly. For example, the club may provide 3D printers, google glasses, etc. Then there
is one Equipment object to stand for 3D printer, and another Equipment object to stand for google
classes. Suppose there are 3 sets of 3D printers and 5 sets of google glasses, then the Equipment
object of 3D printer contains an ArrayList of three EquipmentSet objects for the three 3D printers
and the Equipment object of google glasses contains an ArrayList of five EquipmentSet objects for
the five sets of google glasses.
- Each Equipment object should have the Equipment code (e.g. E1, E2), and the name (e.g. 3D
printer, google glasses), as well as the ArrayList of EquipmentSet objects.
- Each EquipmentSet object stores its information: available or being borrowed (the loan details),
and a list of reservations (or requests). We label the equipment set using the code of the
equipment appended with "_[set number]", like E1_1, E1_2, where E1 is the equipment code, E1_1
means the first set, E1_2 means the second set, etc.
Assignment CS2312 Problem Solving and Programming (2024/2025 Semester A) | www.cs.cityu.edu.hk/~helena
- 2 -
2. The basic command to borrow an equipment is borrow [member ID] [equipment code]. For example,
"borrow 001 E1". It means that the member whose ID is 001 would like to borrow a set of the
equipment E1 for a period of 7 days (which is the default loan period) starting from the current day.
The program should check for the equipment sets of E1 one by one, starting from E1_1, then E1_2
and so on, to mark the equipment set for the member to borrow.
As a variation, the borrow command also accepts the number of days that the member wants to
borrow, instead of the default duration of 7 days. This will be covered in the advanced part of the
assignment.
3. The advanced part of this assignment will deal with reservations of equipment. The command to
request an equipment is request [member ID] [equipment code] [start date] [number of days].
For example, "request 001 E1 06‐Mar‐2024 3" means that the member whose ID is 001 would like to
borrow a set of the equipment E1 for a period of from 06‐Mar‐2024 to 09‐Mar‐2024 inclusive. The
program should check for the equipment sets of E1 one by one, starting from E1_1, then E1_2 and so
on, to identify and mark the available equipment set which is free for borrowing during the period.
The periods of borrowing and requests must not overlap.
4. To guarantee the availability of equipment sets, the club does not allow any member to borrow two or
more sets of the same equipment at the same time. That is, anyone who is currently borrowing an
equipment set cannot borrow one more set of the same equipment. Also, the periods of borrowing
and requests must not overlap.
5. For simplicity
- There is no quota limit for loans or requests.
- There is no restriction on the duration of the period of loans / requests.
- We don't take care of returning equipment set in this assignment (though in reality it should
take place). That is, you may assume that members return equipment on time so that we
don't worry about missing the scheduled reservations (accepted requests).
- As in Lab09, the startNewDay command advances the system date. The listing commands
should ignore the past borrowing/request records. However, for simplicity you may assume
that the test cases will not come across such issue.
6. The names of command classes should start with "Cmd", eg. "class CmdRegister", "class CmdListItems"
7. We have already implemented the following commands in Lab9:
i. register – Register new members of the club
ii. listMembers – List the members and the count of loans and requests
iii. startNewDay – Start a new day as the system date
iv. undo – Undo one command
v. redo – Redo one command
For this assignment, you will revise the above methods and handle the following new commands:
i. create: Create an equipment in the collection
ii. arrive: Add a set of an equipment
iii. listEquipment: List the equipment and the count of equipment sets together with the loans
iv. borrow: A member borrows a set of an equipment for a duration starting from the current day
v. request: A member requests to reserve an equipment for a period
vi. listMemberStatus: For each member, list the loans and requests
vii. listEquipmentStatus: For each equipment, list the equipment sets, and the loans and
requests of the equipment sets
Assignment CS2312 Problem Solving and Programming (2024/2025 Semester A) | www.cs.cityu.edu.hk/~helena
- 3 -
8. Sorting: in the outputs of listings,
The ordering of requests for an equipment set should be based on the start day of concerned periods.
The ordering of equipment should be based on the equipment codes.
The ordering of equipment sets should be based on the equipment set labels.
The ordering of members should be based on the member IDs.
E.g., for listMemberStatus, please show the requests of a member in this order: first sorted by
equipment codes, then equipment set labels, then the start days of the request periods.
Comparison of Days:
To make Day objects comparable, we can simply compare the days as integers like yyyymmdd (eg.
20240305 > 20240301 means 20240305 is later)
9. You will need to add handling for the following error cases
a) Member ID already in use (For registering member)
b) Equipment code already in use (For creation of equipment)
c) Member not found (For borrowing, requesting)
d) Equipment not found (For borrowing, requesting, arrival of items)
e) Member already borrow the same equipment (For borrowing)
f) Borrow/request period overlaps with a current period (For borrowing/requesting)
g) Insufficient equipment set to satisfy the command (For borrowing/requesting)
h) Number of days of period is less than 1 (For borrowing/requesting)
i) Invalid date format, date is before the current day (For startNewDay, requesting)
j) Insufficient command arguments (For all commands, e.g. missing member id to register)
k) Unknown command (Checking in main(). The program should terminate.)
- Most of the above should be done by Exception Handling. You should name all Exception classes
with prefix: "Ex", eg. "ExItemIdInUse", "ExMemberNotFound"
- Please pay attention to the following:
Advantages of Using Exceptions (Week 09 Lecture exercise Q5)
=================================================
Advantage 1. Separating Error-handling from "Regular" Code (** You should achieve in this assignment (most cases) !!)
Advantage 2. Grouping and Differentiating Errors (Not needed for assignment)
Advantage 3. Propagating Errors up the call stack (** MUST achieve in your assignment !!!)
10. Concerns about efficiency: Assume that we have up to m=5000 members and n=50000 equipment
sets. For modern computers, keeping these records, doing any linear time operations, and providing
sorting/searching are not a problem. Therefore, please spend more time and effort on modelling the
entities involved in the case study.
11. The requirements in each phase and test cases for reference are given on Page 4.
The given test cases and outputs are to show the functionalities that you need to implement. They
also serve to specify the input and output formats.
However, note that they do not test rigorously for the accuracy of your program.
For example, your program should be able to handle many equipment, equipment sets, members, and many
valid or invalid borrowing / requests. Various sequences of undo-redo commands may also appear.
If your program fails to work appropriately, then your grade will be affected due to incorrect solution
(despite that you might have obtained 100% correct in PASS).
To help verify that students have applied proper solution design, a few test cases on PASS are NOT
disclosed. These test cases will be posted after manual marking.
Assignment CS2312 Problem Solving and Programming (2024/2025 Semester A) | www.cs.cityu.edu.hk/~helena
- 4 -
Q: What if my program cannot pass these test cases just because of some minor problems, e.g.
spacing or string spelling problems? I don't want to lose my marks just based on these nontechnical
issues.
A: Helena will manually check the cases and will restore the score for you if the discrepancy is not
related to problem solving or code design.
Grading and requirements by phases:
Below are the main requirements and test cases of each phase, and general
guidelines. For further details of command formats and required outputs,
please refer to the styles in Lab08 Q2 to Lab10, and the contents in the given
test cases and outputs for this assignment at the course web.
Submission:
Please submit them to PASS as shown below:
For Mac users,
please read Canvas => CS2312 => Announcements => " Online zip tools for Mac users (for PASS submission)"
Also required:
good programming styles +
OO programming skills
(Please refer to P. 1)
‐‐ end ‐‐
.zip file (contains all .java except
Main.java, they should be in a flat folder.)
Main.java (This class should
contain the main method)
软件开发、广告设计客服
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
软件定制开发网!