首页
编程语言
数据库
网络开发
Algorithm算法
移动开发
系统相关
金融统计
人工智能
其他
首页
>
> 详细
comp20005 Engineering Computation
School of Computing and Information Systems comp20005 Engineering Computation Semester 1, 2019 Assignment 2 Learning Outcomes In this project you will demonstrate your understanding of structures and arrays of structures, and will develop a computational solution for a non-trivial problem. You are expected to make extensive use of functions; and to demonstrate that you have adopted a clear and elegant programming style. You will find it difficult to create a working solution unless you plan your program carefully in advance, and develop it incrementally. The Mission You will again be working with numeric data, this time in connection with rainfall records. All of the data files used in this project have been sourced directly from the Bureau of Meteorology web site at http://www.bom.gov.au/climate/data/, and remain in the format in which they were downloaded. The program that you write will identify historical trends that may exist in the input data, and allow visualization of the data. Stage 1 – Reading the Data (Marks up to 9/20) In this stage you should read all of the data into internal structures suitable for use in the later stages, and create an output representation that provides an overview of the data that was read. Input will come from a comma-separated-values file, with each input line (after the first header line) looking like: IDCJAC0001,086039,2000,01,28.2,Y IDCJAC0001,086039,2000,02,34.5,Y IDCJAC0001,086039,2000,03,22.5,Y IDCJAC0001,086039,2000,05,96.3,Y IDCJAC0001,086039,2000,06,42.4,Y IDCJAC0001,086039,2000,07,45.1,Y recording, for example, that the rainfall measured at site 086039 (Flemington Racecourse, in Melbourne) in January 2000 was 28.2 millimeters. The last value in each line is Y or N to indicate whether the data has been “validated”. To read one line, you should use the format control string "IDCJAC0001,%d,%d,%d,%lf,%c" with suitable receiving variables, and then skip any remaining characters on that line until a newline character has been consumed. Note that IDCJAC0001 is a fixed string that identifies the type of data, and will appear in all data files that your program will process. You may assume that the lines in the input are always in ascending-year then ascending-month order, but also need to be aware that there may be missing data lines. For example, there is no data for April 2000 in the test file shown above. Missing values are completely typical of sensor-based data, and occur because of equipment malfunction, network errors, and so on. A sample of the required output of this stage is: mac: ass2-soln < rainfall-086039-2000-2009.csv S1, site number 086039, 115 datalines in input S1, 2000: Jan Feb Mar ... May Jun Jul Aug Sep Oct Nov Dec S1, 2001: Jan Feb Mar ... May Jun Jul Aug Sep* Oct Nov* Dec 1
S1, 2009: Jan Feb* Mar Apr May Jun* Jul Aug Sep Oct Nov Dec where rainfall-086039-2000-2009.csv is one of the test files linked from the FAQ page; where * indicates a value that has not been validated; and where ... indicates a completely missing value. Full output examples are linked from the FAQ page. Note that the input might start part way through one year and end part way through another, so be sure that you handle the first and last year correctly. There might also be whole missing years, in which case your program should report every month for that year as a ... entry. You should be able to get started on the required program for this stage quite quickly, based on your solution to the first project (or the sample solution to the first project). And an explicit permission – you may include this declaration as a global array if you wish to (and if you can see how it would be useful): char *months[] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; Stage 2 – The Annual Rainfall Cycle (Marks up to 12/20) Add further functionality to your program so that for each month of the year the average rainfall is computed and reported. All months for which at least one data item is available should be listed, and unverified items should also be counted and included in the average. A sample of output lines for the same test file is: S2, Jan, 10 values, 2000-2009, mean of 23.5mm S2, Feb, 10 values, 2000-2009, mean of 45.5mm S2, Mar, 9 values, 2000-2009, mean of 33.8mm
S2, Dec, 10 values, 2000-2009, mean of 48.6mm Full examples are linked from the FAQ page, including showing what should be written if there are no rainfall records in one or more of the months. Note that the monthly averages are required again in Stage 4, so they should be computed in this stage and then retained, rather than being computed again later. Stage 3 – Climate Change? (Marks up to 16/20) Ok, now for some trend analysis. Suppose that a sequence of n values hr0 : : : rn1i is given (in this case, ri is the rainfall amount for some specific month across a sequence of years), and we wish to know if there is an overall upward or downward trend over the n values. One simple correlation coefficient that can be used is Kendall’s (pronounced “tau”), which for data already ordered on one aspect (in our case, ordered by time) is computed as: = 1 n(n 1)=2 0 @ nX2 i=0 nX1 j=i+1 (ri; rj) 1 A where (ri; rj) is +1 if ri < rj ; is 1 if ri > rj ; and is 0 if ri = rj . A value of +1:0 indicates perfect monotonic increase across the sequence of values; a value of 1:0 indicates perfect monotonic decrease across the sequence of values; and a value of 0:0 indicates neither consistent growth nor consistent decrease. In this stage you are to compute twelve values from the input data, one for each of the months. Each value will be computed from the sequence hrii that represents the rainfall for one specific month across the span of years available in the data. No value should be reported if there are less than two instances of that particular month in the input file, see the FAQ for examples. 2 S3, Jan, 10 values, 2000-2009, tau of -0.11 S3, Feb, 10 values, 2000-2009, tau of -0.11 S3, Mar, 9 values, 2000-2009, tau of -0.11
S3, Dec, 10 values, 2000-2009, tau of 0.36 Stage 4 – Let It Rain! (Marks up to 20/20) And now for the fun. Add further functionality to your program so that, for each year number specified as an argument on the command-line, a bar chart is plotted showing the rainfall for that year broken down by months, compared to the average for that month across the years listed in the input data file. One complete graph is to be produced for each year that is specified as a program argument, see the examples linked from the FAQ page. If no arguments are supplied, no graphs are to be generated. To control the height of the graph, a vertical scaling factor should be identified by finding the smallest integer such that the height of the maximum point plotted in the graph above the axis is at most 24 rows. The example below shows the required output for the year 2003 when using the same sample data file. To make this graph, the largest point to be plotted is identified as being 71:6 mm of rain, and hence a scale factor of d71:6=24e = 3 is required. Then to get the first bar, January 2003 had a rainfall (in this data file) of 9:8 mm and the January average (in this data file) is 23:5 mm, and so with a scale factor of three, the January average is plotted in the 8 th cell high (d23:5=3e = 8) and the January actual is plotted from the first to the 4 th cells high (d9:8=3e = 4). Note that the graph cells in the row to the right of each numbered label v (for example, look at v = 24 in the example) get used for values of r (rainfall amount) in the range vscale < r v. The January monthly average in this data file is 23:5, and hence is marked in the row labeled v = 24. If the value had been exactly 24:0 it would also be plotted in that cell, but if it was 24:1 it would appear in the row labeled 27. Finally, note that the two digits used in each bar are the last two digits of the year number that is being plotted. mac: ass2-soln 2003 < rainfall-086039-2000-2009.csv
S4, 2003 max is 71.6, scale is 3 72 | 03 03 69 | 03 03 03 66 | 03 03 03 63 | 03 03 03 60 | 03 03 03 03 57 | 03 03 03 03 **** 03 54 | 03 03 03 03 03 51 | 03 03 03 **** *03* *03* 48 | **** 03 03 *03* 03 03 45 | 03 03 03 03 03 42 | 03 *03* 03 03 03 39 | *03* **** 03 03 03 03 03 03 36 | **** 03 *03* 03 03 03 03 03 33 | 03 03 03 03 03 03 03 30 | 03 03 03 03 03 03 03 27 | 03 03 03 03 03 03 03 03 03 24 | **** 03 03 03 03 03 03 03 03 03 21 | 03 03 03 03 03 03 03 03 03 03 03 18 | 03 03 03 03 03 03 03 03 03 03 03 15 | 03 03 03 03 03 03 03 03 03 03 03 12 | 03 03 03 03 03 03 03 03 03 03 03 03 9 | 03 03 03 03 03 03 03 03 03 03 03 03 6 | 03 03 03 03 03 03 03 03 03 03 03 03 3 | 03 03 03 03 03 03 03 03 03 03 03 03 0 +-----+----+----+----+----+----+----+----+----+----+----+----+ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec If there is no record of rainfall for a particular month within the year being plotted (or if there is no data for that whole year at all, including cases when the specified year is outside the span of years 3 included in the data file), plot that month as zero (which means, no marking in the graph), but still plot the average. If there is no average, because there were no readings at all for that month in the input file, don’t plot the average either. Modifications to the Specification There are bound to be areas where this specification needs clarification or correction. Refer to the FAQ page at http://people.eng.unimelb.edu.au/ammoffat/teaching/20005/ass2/ regularly for updates to these instructions. There is already a range of information provided there that you need to be aware of, with more likely to follow. The Boring Stuff... This project is worth 20% of your final mark. A rubric explaining the marking expectations is linked from the FAQ page, and you should read it carefully. You need to submit your program for assessment; detailed instructions on how to do that are linked from the FAQ page. You can (and should) use submit both early and often – to get used to the way it works, and also to check that your program compiles correctly on the test server, which has some different characteristics to the lab machines. Failure to follow this simple advice is likely to result in tears. Only the last submission that you make before the deadline will be marked. You may discuss your work during your workshop, and with others in the class, but what gets typed into your program must be individual work, not copied from anyone else. So, do not give hard copy or soft copy of your work to anyone else; do not “lend” your “Uni backup” memory stick to others for any reason at all; and do not ask others to give you their programs “just so that I can take a look and get some ideas, I won’t copy, honest”. The best way to help your friends in this regard is to say a very firm “no” when they ask for a copy of, or to see, your program, pointing out that your “no”, and their acceptance of that decision, is the only thing that will preserve your friendship. A sophisticated program that undertakes deep structural analysis of C code identifying regions of similarity will be run over all submissions. Students whose programs are identified as containing significant overlaps will be evaluated for mark penalties of for referral to the Student Center for possible disciplinary action without further warning. This message is the warning. See https://academicintegrity.unimelb.edu.au for more information. Note also that solicitation of solutions via posts to online forums, whether or not there is payment involved, is also taken very seriously. In the past students have had their enrolment terminated for such behavior. Very Important: The FAQ page contains a link to a program skeleton that you must start with, including an Authorship Declaration that you must “sign” and include at the top of your submitted program. Marks will be deducted if you do not include the declaration, or do not sign it, or do not comply with its expectations. Deadline: Programs not submitted by 10:00am on Monday 27 May will lose penalty marks at the rate of two marks per day or part day late. Students seeking extensions for medical or other “outside my control” reasons should email ammoffat@unimelb.edu.au as soon as possible after those circumstances arise. If you attend a GP or other health care professional as a result of illness, be sure to take a Health Professional Report form with you (get it from the Special Consideration section of the Student Portal), you will need this form to be filled out if your illness develops in to something that later requires a Special Consideration application to be lodged. You should scan the HPR form and send it in connection with any non-Special Consideration assignment extension requests. A sample solution will be linked from the FAQ page by June 4, and it is hoped that marks will be available on the LMS by the evening of Tuesday 11 June. c The University of Melbourne, 2019. Prepared by Alistair Moffat, ammoffat@unimelb.edu.au.
联系我们
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-21:00
微信:codinghelp
热点文章
更多
辅导 comm2000 creating socia...
2026-01-08
讲解 isen1000 – introductio...
2026-01-08
讲解 cme213 radix sort讲解 c...
2026-01-08
辅导 csc370 database讲解 迭代
2026-01-08
讲解 ca2401 a list of colleg...
2026-01-08
讲解 nfe2140 midi scale play...
2026-01-08
讲解 ca2401 the universal li...
2026-01-08
辅导 engg7302 advanced compu...
2026-01-08
辅导 comp331/557 – class te...
2026-01-08
讲解 soft2412 comp9412 exam辅...
2026-01-08
讲解 scenario # 1 honesty讲解...
2026-01-08
讲解 002499 accounting infor...
2026-01-08
讲解 comp9313 2021t3 project...
2026-01-08
讲解 stat1201 analysis of sc...
2026-01-08
辅导 stat5611: statistical m...
2026-01-08
辅导 mth2010-mth2015 - multi...
2026-01-08
辅导 eeet2387 switched mode ...
2026-01-08
讲解 an online payment servi...
2026-01-08
讲解 textfilter辅导 r语言
2026-01-08
讲解 rutgers ece 434 linux o...
2026-01-08
热点标签
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: 99515681 微信:codinghelp
© 2024
www.7daixie.com
站长地图
程序辅导网!