首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代做COMP9024、代写c/c++编程设计
项目预算:
开发周期:
发布时间:
要求地区:
COMP9024 23T3
TripView
Change Log
We may make minor changes to the spec to address/clarify some outstanding issues. These may
require minimal changes in your design/code, if at all. Students are strongly encouraged to check the
change log regularly.
Version 1: Released on 20 October 2023
Objectives
The assignment aims to give you more independent, self-directed practice with
advanced data structures, especially graphs
graph algorithms
asymptotic runtime analysis
Admin
Marks 3 marks for stage 1 (correctness)
5 marks for stage 2 (correctness)
2 marks for stage 3 (correctness)
1 mark for complexity analysis
1 mark for style
———————
Total: 12 marks
Due 5:00:00pm on Monday 13 November (week 10)
Late 5% penalty per day late
(e.g. if you are 25 hours late, your mark will be reduced by 10%)
Aim
The objective is to write a program tripView.c that generates an optimal trip on (a part of) Sydney's
railway network based on user preferences.
Input
Railway stations
The first input to your program consists of an integer n > 0, indicating the number of railway stations on
the network, followed by n*2 lines of the form:
railway-station
transfer-time
where the first line is the name of a station and the second line denotes the time – in minutes – it takes
to transfer to a different train at that station.
Here is an example:
prompt$ ./tripView
Size of network: 3
HarrisPark
1
TownHall
3
NorthSydney
2
You may assume that:
The input is syntactically correct.
The maximum length (strlen()) of the name of a railway station is 16 and will not use any
spaces.
The transfer time will be a positive integer.
No name will be input more than once.
Hint:
To read a single line with a station name you should use:
scanf("%s", name);
where name is a string, i.e. an array of chars.
Timetables
The next input to your program is an integer m > 0, indicating the number of trains on any day, followed
by m timetables. Each timetable starts with the number s > 1 of stops followed by s*2 lines of the form:
station
hhmm
meaning that you can get on or off the train at that station at the given time (hh – hour, mm – minute).
Here is an example:
Number of timetables: 2
Number of stops: 3
HarrisPark
0945
TownHall
1020
NorthSydney
1035
Number of stops: 2
TownHall
1024
NorthSydney
1033
You may assume that:
The input is syntactically correct.
All times are given as 4 digits and are valid, ranging from 0000 to 2359.
Only train stations that have been input earlier as part of the network will be used.
The stops are input in the correct temporal order.
All trains reach their final stop before midnight.
Trip View
The final input to your program are user queries:
From: HarrisPark
To: NorthSydney
Arrive at or before: 1200
As before, you may assume that the input is correct: Two different valid railway stations followed by a
valid time in the form of 4 digits.
Your program should terminate when the user enters "done" when prompted with From:
From: done
Bye
prompt$
Stage 1 (3 marks)
Stage 1 requires you to generate a suitable data structure from the input.
Test cases for this stage will only use queries FromStation, ToStation, ArrivalTime such
that:
there exists one, and only one, train that travels from FromStation to ToStation ;
this train arrives on, or before, the given ArrivalTime ; and
this train is the desired output for the query.
Therefore, at this stage all you need to do is find and output the connection between the two train
stations, including all the stops along the way and the arrival/departure times.
Here is an example to demonstrate the expected behaviour of your program for a stage 1 test:
prompt$ ./tripView
Size of network: 7
Ashfield
5
Central
8
HarrisPark
1
MilsonsPoint
2
NorthSydney
2
Redfern
5
TownHall
3
Number of timetables: 2
Number of stops: 5
HarrisPark
0945
Ashfield
0955
Redfern
1006
TownHall
1020
NorthSydney
1035
Number of stops: 4
Redfern
1359
Central
1406
TownHall
1410
MilsonsPoint
1430
From: Central
To: MilsonsPoint
Arrive at or before: 1600
1406 Central
1410 TownHall
1430 MilsonsPoint
From: Ashfield
To: NorthSydney
Arrive at or before: 1040
0955 Ashfield
1006 Redfern
1020 TownHall
1035 NorthSydney
From: done
Bye
prompt$
Stage 2 (5 marks)
For the next stage, your program should find and output a connection from FromStation to
ToStation that:
may involve one or more train changes;
arrives at ToStation no later than ArrivalTime ; and
leaves as late as possible.
Note that you can get onto a different train at any station, but it is necessary to take into account the
time it takes to change trains at that station.
In all test scenarios for this stage there will be at most one connection that satisfies all requirements.
Here is an example to demonstrate the expected behaviour of your program for stage 2:
prompt$ ./tripView
Size of network: 6
Ashfield
5
Central
8
HarrisPark
1
NorthSydney
2
Redfern
5
TownHall
3
Number of timetables: 2
Number of stops: 5
HarrisPark
0945
Ashfield
0955
Redfern
1006
TownHall
1020
NorthSydney
1035
Number of stops: 3
HarrisPark
0950
Central
1010
TownHall
1017
From: HarrisPark
To: NorthSydney
Arrive at or before: 1040
0950 HarrisPark
1010 Central
1017 TownHall
Change at TownHall
1020 TownHall
1035 NorthSydney
From: done
Bye
prompt$
If there is no connection that satisfies the requirements, then the output should be: No
connection.
From: HarrisPark
To: TownHall
Arrive by: 1015
No connection.
Stage 3 (2 marks)
For the final stage, if there are multiple possible connections with the same latest departure time, your
program should take into account the additional user preference that:
among all the connections with the latest possible departure time, choose the one with the
shortest overall travel time.
You may assume that there will never be more than one connection with the latest possible departure
time and the shortest overall travel time. Note also that travel time includes the time it takes to change
trains and the waiting time if applicable.
Here is an example to demonstrate the expected behaviour of your program for stage 3:
prompt$ ./tripView
Size of network: 3
HarrisPark
1
NorthSydney
2
TownHall
3
Number of timetables: 2
Number of stops: 3
HarrisPark
0945
TownHall
1020
NorthSydney
1035
Number of stops: 2
TownHall
1024
NorthSydney
1033
From: HarrisPark
To: NorthSydney
Arrive at or before: 1040
0945 HarrisPark
1020 TownHall
Change at TownHall
1024 TownHall
1033 NorthSydney
From: done
Bye
prompt$
Complexity Analysis (1 mark)
You should include a time complexity analysis for the asymptotic worst-case running time of your
program, in Big-Oh notation, depending on the size of the input:
1. the size of the network, n
2. the number of timetables, m
3. the maximum number of stops on any one timetable, s.
Hints
If you find any of the following ADTs from the lectures useful, then you can, and indeed are encouraged
to, use them with your program:
linked list ADT : list.h, list.c
stack ADT : stack.h, stack.c
queue ADT : queue.h, queue.c
priority queue ADT : PQueue.h, PQueue.c
graph ADT : Graph.h, Graph.c
weighted graph ADT : WGraph.h, WGraph.c
You are free to modify any of the six ADTs for the purpose of the assignment (but without
changing the file names). If your program is using one or more of these ADTs, you should submit both
the header and implementation file, even if you have not changed them.
Your main program file tripView.c should start with a comment: /* … */ that contains the time
complexity of your program in Big-Oh notation, together with a short explanation.
Testing
We have created a script that can automatically test your program. To run this test you can execute the
dryrun program that corresponds to this assignment. It expects to find, in the current directory, the
program tripView.c and any of the admissible ADTs
(Graph,WGraph,stack,queue,PQueue,list) that your program is using, even if you use them
unchanged. You can use dryrun as follows:
prompt$ 9024 dryrun tripView
Please note: Passing dryrun does not guarantee that your program is correct. You should thoroughly
test your program with your own test cases.
Submit
For this project you will need to submit a file named tripView.c and, optionally, any of the ADTs
named Graph,WGraph,stack,queue,PQueue,list that your program is using, even if you
have not changed them. You can either submit through WebCMS3 or use a command line. For
example, if your program uses the Graph ADT and the queue ADT, then you should submit:
prompt$ give cs9024 assn tripView.c Graph.h Graph.c queue.h queue.c
Do not forget to add the time complexity to your main source code file tripView.c.
You can submit as many times as you like — later submissions will overwrite earlier ones. You can
check that your submission has been received on WebCMS3 or by using the following command:
prompt$ 9024 classrun -check assn
Marking
This project will be marked on functionality in the first instance, so it is very important that the output of
your program be exactly correct as shown in the examples above. Submissions which score very low
on the automarking will be looked at by a human and may receive a few marks, provided the code is
well-structured and commented.
Programs that generate compilation errors will receive a very low mark, no matter what other virtues
they may have. In general, a program that attempts a substantial part of the job and does that part
correctly will receive more marks than one attempting to do the entire job but with many errors.
Style considerations include:
Readability
Structured programming
Good commenting
Plagiarism
Group submissions will not be allowed. Your programs must be entirely your own work. Plagiarism
detection software will be used to compare all submissions pairwise (including submissions for similar
assessments in previous years, if applicable) and serious penalties will be applied, including an entry on
UNSW's plagiarism register.
You are not permitted to use code generated with the help of automatic tools such as GitHub Pilot,
ChatGPT, Google Bard.
Do not copy ideas or code from others
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
代做ece5550: applied kalman ...
2024-12-24
代做cp1402 assignment - netw...
2024-12-24
热点标签
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
软件定制开发网!