首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
COMP9024编程辅导、Data Structures程序讲解、C/C++编程语言调试 调试Matlab程序|调试Web开发
项目预算:
开发周期:
发布时间:
要求地区:
Data Structures and Algorithms COMP9024 20T3
Assignment
TripPlanner
Objectives
The assignment aims to give you more independent, self-directed practice
with
• advanced data structures, especially graphs
• graph algorithms
• asymptotic runtime analysis
• understanding how to use graphs to solve problems in real life.
Aim
Your task is to write a program TripPlaner.c for finding an optimal bus
connection that takes into account a given arrival time and user preferences.
To implement the TripPlaner you will need to implement a simple bus
network. For that you will use a digraph to represent a bus network and
implement several functions for the bus network to enable it usage.
Admin
Marks 3 marks for stage 1 (correctness)
5 marks for stage 2 (correctness)
2 marks for stage 3 (correctness)
1 marks for complexity analysis
1 mark for style
———————
Total: 12 marks
Due 12:00 noon on Monday 23 November
Late 2 marks (16.67%) off the ceiling per day late
(e.g. if you are 25 hours late, your maximum possible
mark is 8)
Data Structures and Algorithms COMP9024 20T3
The TripPlaner
The bus network will consists of a set of bus stops and the bus schedule.
• Each bus stop has a unique name that consists of one word, such as
Parramatta.
• Each bus has a schedule, given in “hhmm” meaning that passengers can
get on or off the bus at that time (hh – hour, mm – minute) at particular bus
stop.
Input
Bus Stop names
Your program should start by prompting the user to input a positive number n
followed by n lines, each containing the name of a bus stop. An example Is:
You may assume that:
• The input is syntactically correct.
• Bus stop names require no more than 31 characters and will not use
any spaces.
• No bus stop name will be input more than once.
Hint:
To read a single line with a bus stop name you may use “scanf”.
Buses
Next, your program should ask the user for the number m of busses running
during a day, followed by m schedules.
Each schedule requires the number of stops, k≥2, followed by k*2 lines of the
form:
Data Structures and Algorithms COMP9024 20T3
If you enter: 2 busses, for each bus you need to provide the schedule, for
example:
You may assume that:
• The input is syntactically correct: 4 digits followed by the name of a bus
stop on a new line.
• All times are valid and range from 0000 to 2359.
• Stops are input in the right (temporal) order.
• There are no overnight busses: Each bus will reach its final stop before
midnight.
• Only valid bus stop names that have been input before will be used.
Queries
After reading the network, your program should enable the user to search for
a connection, by prompting the user to enter: From,To and desired arrival
time, ArriveBy. For example :
When you finish using the program, you should type “done”.
Then your program should terminate, for example:
Data Structures and Algorithms COMP9024 20T3
Stage 1 (3 marks)
For stage 1, you should demonstrate that you can read the input and
generate a suitable data structure.
For this stage, all test cases will only use queries (From, To, ArriveBy) for
which
• there is only one bus between From and To ; and
• this bus is guaranteed to arrive on, or before, the requested time,
ArriveBy .
Hence, all you need to do for this stage is find and output this bus connection,
including all stops along the way and the arrival/departure times. Here is an
example to show the desired behaviour of your program for a stage 1 test
Data Structures and Algorithms COMP9024 20T3
Stage 2 (5 marks)
For stage 2, you should extend your program for stage 1 such that it always
finds, and outputs, a connection between From and To that
• arrives on, or before, the requested time ArriveBy ; and
• departs as late as possible.
You should assume that:
• Changing busses takes no time: Passengers arriving at a bus stop can
get onto any other bus that leaves that stop at the same time or later.
• In all test scenarios there will be at most one connection that satisfies
all requirements.
If there is no connection, the output should be:
Here is an example to show the desired behaviour and output of your
program for a stage 2 test:
Data Structures and Algorithms COMP9024 20T3
Stage 3 (2 marks)
For stage 3, you should extend your program for stage 2 such that:
If there are two or more connections with the same latest departure time,
choose the one with the earliest arrival time.
Here is an example to show the desired behaviour and output of your
program for a stage 3 test:
Data Structures and Algorithms COMP9024 20T3
Complexity Analysis (1 mark)
Your program should include a time complexity analysis for the worst-case
asymptotic running time of your program, in Big-Oh notation, depending on
the size of the input:
1. the number of bus stops, n
2. the number of busses, m
3. the maximum number k of stops on a bus line.
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
• graph ADT : Graph.h, Graph.c
• weighted graph ADT : WGraph.h, WGraph.c
Data Structures and Algorithms COMP9024 20T3
You are free to modify any of the five 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 TripPlaner.c should start with a comment: /* …
*/ that contains the time complexity of your program in Big-Oh notation,
together with a short explanation.
Testing
The dryrun and additional test cases will be available soon, please test your
program with your own test cases until then.
Submit
For this project you will need to submit a file named TripPlaner.c and,
optionally, any of the ADTs named Graph,WGraph,stack,queue,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:
Do not forget to add the time complexity to your main source code file
TripPlaner.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:
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.
Data Structures and Algorithms COMP9024 20T3
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 program must be entirely your
own work. Plagiarism detection software will be used to compare all
submissions pairwise (including submissions for similar projects in previous
years, if applicable) and serious penalties will be applied, particularly in the
case of repeat offences.
• Do not copy ideas or code from others
• Do not use a publicly accessible repository or allow anyone to see
your code, not even after the deadline
Please refer to the on-line sources to help you understand what plagiarism is
and how it is dealt with at UNSW:
• Plagiarism and Academic Integrity
• UNSW Plagiarism Policy Statement
• UNSW Plagiarism Procedure
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
data程序代写、代做c/c++编程语...
2024-05-17
data程序代写、代做python编程...
2024-05-17
program代做、c/c++,python程...
2024-05-17
代写math 3333 3.0 - winter 2...
2024-05-17
代做seng6110 programming ass...
2024-05-17
代写seng6110 object oriented...
2024-05-17
代写comp828: statistical pro...
2024-05-17
代做culture and society调试数...
2024-05-17
代做comp 4911 winter 2024 as...
2024-05-17
代做lh physical iiib / 03 33...
2024-05-17
代做3032ict big data analyti...
2024-05-17
代写comp4702 report代写留学生...
2024-05-17
代写fin2020 hw6代写c/c++编程
2024-05-17
热点标签
fit2004
fit3152
mec208
econ20120
cpt304
econ2101
econ0051
engi4547
econ1048
eengm2510
fit1008
7033mkt
ec2066
cct380h5f
man00019m
mech265001
fin2020
fit9137
n1542
csc4140
math6119
comp1710
fina864
csys5020
busi4412
math5007
2702ict
dts204tc
comp2003j
cosc2673
ecmt2150
bff3121–
comu7000
stat6118
comp814
acc202
ematm0067
bit233
ecs776p
600543
bpln0025
comp3400
econ7030
159.342 ‐ operating
mang6134
math1005/math6005
geog5404m
comp1710/6780
infs 2042
inf6028
bman30702
math0002
msci242l
mgt11001
com00177m
bman71282
fit2001
cpt210
159.341
econ7310
comp3221
comp10002
cpt206
ecmt1010
finm081
econ2005
cpt202
fit3094
socs0030
data7201
data2x01
mn-3507
mat246h1
ib2d90
ib3j80
acc207
comp90007
compx518-24a
fit1050
info1111
acct2201
buad801
compsci369
cse 332s
info1110
math1033
scie1000
eeee2057
math4063
cmt219
econ5074
eng5009
csse2310/csse7231
ec333
econ0001
cpt204
elec4630
ma117
dts104tc
comp2017
640481
csit128
eco000109m
finc5090
ggr202h5f
nbs8295
4ssmn902
chc6171
dsa1002
ebu6304
comp1021
csci-ua.202
com6511
ma416
mec206
iom209
bism7202
idepg001
cpt106
comp1212
ecom209
math1062
mn-3526
fnce3000
fmhu5002
psyc10003
fina2222
be631-6-sp/1
finc2011
37989
5aaob204
citx1401
econ0028
bsan3204
comp9123
cmt218
itp122
qbus6820
ecmt1020
bus0117
soft3202/comp9202
basc0057
mecm30013
aem4060
acb1120
comp2123
econ2151
ecmt6006
inmr77
com 5140
ocmp5328
comp1039
had7002h
cmt309
asb-3715
elec373
cpt204-2324
be631-6-sp
econ3016
mast10007
buss6002
comp4403
comp30023
finm1416
csc-30002
6qqmn971
fin668
mnfg309
inft2031
cits1402
comp2011
eecs 3221
ebu4201
ct60a9600
com336
8pro102
econ7300
comp3425
comp8410
comp222
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
32022
mth6158
comp328
finn41615
2024
mec302
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!