联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2020-10-17 11:30

School of Computing & Information Technology

CSCI251/CSCI851/HCSC851

Advanced Programming

Spring 2020

Assignment 2 (Worth 1% (Part A) + 13% (Part B))

Due 11:55pm Monday 26th October 2020 (Start of Week 11).

Early diagram submission: 11:55pm Wednesday 30th September 2020 (Mid first week of

the midterm break).

Overview

This assignment is to be implemented using object oriented programming. It involves implementing a

simulation of a Octathlon.

In addition to providing code you need to do the following:

? Submit a draft UML like class diagram indicating how your classes are structured and related.

? Submit a final report, which contains a final UML like class diagram reflecting the structure in your

code, and text/tables/diagrams addressing the points below:

1. Describe the events that you will be adding to your Octathlon. Explain the scoring of them.

2. Describe qualitatively, so not numerically, the characteristics you use for the athletes.

3. Describe the special features possible for locations, and how they impact on performance.

4. Describe the characteristics of the support staff for each team and qualititatively how those

impact on the team activities.

5. Describe the process you use to determine performance in each event. In particular, this should

reference the characteristics mentioned in the previous point, and should take into account the

functionality implied by the roles of the support staff.

6. Describe your weather system, and how that impacts on your events.

In addressing those points, you shouldn’t be including code as a way of illustrating what you are

doing.

1

General notes

These are some general rules about what you should and shouldn’t do.

1. Your assignment should be sensibly organised with the same kind of expectations in this area as

assignment one, although you may reasonably have more files for this assignment. No memory leaks

etc. too.

2. Other than the initial command line input, the program should run without user input.

In particular this means there shouldn’t be pauses waiting for the user to press a key.

3. There shouldn’t be pauses generally, please don’t use sleep!

4. Your code must compile on capa with the compilation instructions you provide in Readme.txt. If it

doesn’t you will likely receive zero for the coding part of the assignment.

5. You have to use classes, and should make use of encapsulation.

6. You must use inheritance. If you don’t use inheritance you will lose a fair few marks.

7. You can use polymorphism, if it’s appropriate.

8. If you use operator overloading, it should be appropriate.

9. You can use your own data files to import for names or similar information.

10. Output should only be to standard out or standard error.

1 The Nova Octathlon

Every year, teams challenge for supremecy in a range of sporting events. Interest has recently turned

to The Nova Octathlon, a contest comprising eight events. Those events mix traditional track and field

events, together with some more obscure events.

Your code should compile on capa according to instructions you provide in a Readme.txt file.

Once your program is compiled into the executable TNO, it must run as follows:

./TNO n m

where n is the number of teams competing, and m is the number of octathlon meets that will take place

this season. The values of n and m should each be in the range 1 to 8 inclusive.

On running, TNO should report on the teams. This involves listing the athletes and the team support,

including names and characteristics.

TNO should also report on the season ahead, listing the dates and locations along with the special

feature of each location. The dates can be a simple day number relative to the start of the simulation,

with the first meet starting on day 1. This initial report shouldn’t include weather, since that should be

determined on the competition day.

2

2 Components

You need to give consistent and appropriate definitions for a class hierarchy associated with the various

components of the scenario to be modelled.

2.1 The Octathlon season, locations, and the weather

The number of meets in the season is specified as one of the command line parameters. Each meet

correspond to two days of activity in a distinct location, four events on each day. The same four events

will always occur on the same days. The gap between each meet is a random 5 to 7 days.

Each location should have a special feature that impacts on the running of at least one of the events.

This could be, for example, a location has the 100–metre track sloped upwards.

You can have a fixed collection of locations, with fixed special features, or random locations and/or

randomly added special features. You need to make sure the feature included for each active location is

different though.

You need to have a weather system which, although it may be quite simple, should have some impact

on events. You should report on the weather at the start of each competition day and give some sort of

sensible impact report.

2.2 Events

Four events are standard track and field events. The 100 metres and the 1500 metres are standard track

events, while the discus throw and the high jump are standard field events.

You need to choose four other events that will be part of your Octathlon. These do not have to be

standard track and field events, but can be. Two must be identified as track events (T1 and T2), and two

must be identified as field events (F1 and F2).

The difference between track and field events are reflected in the way the scoring for each differs. Note

that all events must be individual and judging cannot be subjective. The performance in ...

... track events is measured in time taken, with the aim to be take as little time as possible.

... in field events is measured in a spatial distance, with the aim to get as high a distance as possible.

The order of the events should be as follows:

? Day One :

1. 100 metre running race.

2.3 The teams

Each team has two athletes, one of them male and one of them female. Each team also has a team manager,

and a support crew consisting of : one sports psychologist, one physiotherapist, and two trainers. One of

the trainers specialises in field events, the other in track events.

You need to implement functionality consistent with the roles of the support crew, as described below.

This means, for example, that there should be a small chance of an injury during each event. The nature

of the competition means that even severly injured athletes must continue, you just wouldn’t expect them

to do well.

The role of a ...

? ... trainer is to improve the performance of the athletes in the relevant area (track or field). They

would aim to improve both the best possible result of the athlete and the consistency of the athlete.

? ... physiotherapist is to assist the physical recovery and readiness of the athletes.

? ... sports psychologist is to help the athletes manage the pressures of competition, success/failure,

and injuries.

Changes to the overall abilities of the athletes should be relatively small across the season. You wouldn’t

expect an athlete to go from at best being able to run the 100 metres in 11 seconds at the start of the

season to being able to run it in 10 seconds at the end of the season.

The team manager is just a name, they have no impact.

2.4 Awards and points

There are two independent competitions running, one for males and one for females.

At any meet, the competitors who get first, second, and third in each of those competitions receive,

respectively, a gold, silver, or bronze medal. Should two competitors have equal scores at the end of a

meet, they will both receive the same award and, when it is gold or silver, no award of the immediately

lower type will be awarded. This means, for example, that you could have two golds and one bronze

awarded. Similarly, if three or more competitors are equal in one of the top three positions, they each

receive a medal of the appropriate type and no lower medals are awarded.

An overall season trophy is given to the two competitors, one male and one female, with the highest

accumulated score across the season.

The points for the standard individual events are to be determined using the IAAF scoring formulas

and tables as described at https://en.wikipedia.org/wiki/Decathlon.

Track events P oints = A(B ? P)

C

Field events P oints = A(P ? B)

C

Event A B C P units

100 metres 25.4347 18 1.81 Seconds

Discus throw 12.91 4 1.1 Metres

High jump 0.8465 75 1.42 Centimetres

1500 metres 0.03768 480 1.85 Seconds

You will need to provide scoring for your own events, and it would make sense to use those same formulas

with different parameter values.

4

2.5 The output

We have already described the output required at the start of the program. The majority of the output

will be associated with the events of the competition days.

As previously noted you should report on the weather at the start of each competition day and give

some sort of sensible impact report.

At the start and end of each meet, report the relevant details on every athlete. For each event, report

the outcome and number of points awarded to each athlete. You can expect that each athlete will become

somewhat tired as they compete, although the impact might be limited until the end of a meet. If an

athlete is injured during an event, this should be reported.

At the end of the meet you should report on the athletes ordered by points for that meet, and identify

the medal winners. Their accumulated points for the season should be reported too.

In–between meets, athletes will recover and train. There should be some output during this time but

not a lot. The gap between meets should usually be sufficient for an athlete to recover from standard

competition wear.

At the end of the season, the athletes should be listed, along with their accumulated season points, in

order of season points. The season award winners should be clearly identified.

3 Randomness

In this section we look at what needs to be random, and what can be.

Aspects that should be random:

1. Athlete attribute values.

2. Attribute values for the support staff.

3. Performance results.

4. Impact of support staff.

5. Weather.

6. Gap between meets.

Aspects that could be random:

1. Names.

2. Locations.

3. Special features, or aspects of them, for the locations.

4. ...

5

Notes on submission

Submission is via Moodle.

Your code must compile on capa with the instructions you provide. If it doesn’t you will likely be given

zero for the programming part of this assignment.

Please submit your source, so .cpp and .h files, Readme.txt file, any data files used, report,

and makefile if you have one, in a zip file A2.zip. There shouldn’t be any directory structure

within the zip file.

Make sure your report is in pdf and has your name, student number, and lab class marked clearly on

it. The final diagram should be in your final report pdf and not in a distinct document. It may be ignored

if it’s a non–pdf format.

Your early diagram submission should also be in pdf, and should also have your name, student number,

and lab class on it. You can split it across multiple diagrams if necessary.

1. The early diagram submission is 11:55pm Wednesday 30th September 2020 (Mid first week

of the midterm break).

2. The main submission deadline is 11:55pm Monday 26th October 2020 (Start of Week 11).

3. Late submissions will be marked with a 25% deduction for each day, including days over the weekend.

4. Submissions more than three days late will not receive marks, unless an extension has been granted.

5. If you need an extension apply through SOLS, if possible before the assignment deadline.

6. Academic misconduct is treated seriously. Students involved will likely receive zero.


c Luke McAven, SCIT-EIS-UOW, 2020.

6


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp