首页
编程语言
数据库
网络开发
Algorithm算法
移动开发
系统相关
金融统计
人工智能
其他
首页
>
> 详细
辅导COMP0004、讲解GUI留学生、辅导Java程序语言、讲解Java 辅导Python编程|辅导Database
COMP0004 Coursework Part II
Purpose: To develop an application with a GUI to display data.
Submission: There is a single submission deadline for all the coursework in this module: Noon
22nd March 2019. You can complete this part at anytime before the deadline.
While working on your code, the project files and source code (no compiled code) should be stored
in a GitHub repository, so that you are using version control properly.
Marking: This part of the coursework is worth 40% of the module mark.
On Moodle you will find a link to some data files on GitHub in Comma Separated Value (CSV)
format. The files contain synthetic patient data, with each line in the file representing one patient.
The example below is the first two lines representing patients in the file patients100.csv:
3e9fd20e-b81c-4698-a7c2-0559e10361fa,
1979-08-24,,999-46-5746,S99951588,X43863756X,Mrs.,Norah104,Stamm704,,Hagenes547,M,wh
ite,french,F,Hanover Massachusetts US,678 Trantow Overpass,New Bedford,Massachusetts,
02740
71917638-8142-42da-87f1-
fa0ba642f161,1989-10-21,,999-95-8365,S99995552,X3761822X,Mr.,Eloy929,Dickinson688,,,M,wh
ite,english,M,Dover Massachusetts US,431 Armstrong Forge,Upton,Massachusetts,01568
As you can see, each line is a sequence of strings separated by commas. Each string represents a
piece of information about a patient. These are the fields or columns used to describe a patient,
and are in the same order on every line. You can load a .csv file into a spreadsheet (e.g., Excel) to
more easily view the data. In the data files provided commas are used only as separators between
strings, which means a line can be easily split into a collection of column strings by splitting it at
each comma.
The first line of the patients.csv file does not represent a patient, instead it gives the column name
for each column, also separated by commas:
Inadequate
(0-39)
Failed to demonstrate a basic understanding of the concepts used in the
coursework, or answer the questions. There are fundamental errors, code will not
compile, or nothing of significance has been achieved. (F)
Just
Adequate
(40-49)
Shows a basic understanding, sufficient to achieve a basic pass, but still has
serious shortcomings. Code may compile but doesn’t work properly. Not all
concepts have been understood or the questions answered correctly.(D)
Competent
(50-59)
Reasonable understanding but with some deficiencies. The code compiles and
runs, the concepts are largely understood. This is the default for a straightforward,
satisfactory answer. (C)
Good
(60-69)
A good understanding, with possibly a few minor issues, but otherwise more than
satisfactory. The code compiles, runs and demonstrates good design practice.
Most expectations have been met. Most questions answered.(B)
Very Good
(70-79)
A very good understanding above the standard expectations, demonstrating a
clear proficiency in programming. All core questions answered.(A)
Excellent
(80-100)
Programming at a level well above expectations, demonstrating expertise in all
aspects. This level is used sparingly only where it is fully justified. Q1-5 answered
very well, significant progress on either Q6 or Q7. (A+, A++)
1 of 3COMP0004 Part II Coursework
ID,BIRTHDATE,DEATHDATE,SSN,DRIVERS,PASSPORT,PREFIX,FIRST,LAST,SUFFIX,MAIDEN,
MARITAL,RACE,ETHNICITY,GENDER,BIRTHPLACE,ADDRESS,CITY,STATE,ZIP
The meaning of the names is obvious, for example FIRST and LAST give the first and last name of
each patient (note this is synthetic data so the names have a numerical code attached - just treat
these as part of the name).
If you look through the data you will see that for some patients a column entry may be left blank,
and you see two commas in a row (i.e., Stamm704,,Hagenes547). Beware that the final column
(ZIP) can be left blank, so that there will be a comma followed by newline.
The first column, ID, is a unique id for each patient. The id is effectively the primary key for each
patient and is what you use to uniquely identify each patient. A few other columns such as SSN
and PASSPORT should be unique but are not usually used as primary keys. The rest of the
columns will not contain unique values and you will certainly find that names and addresses
appear multiple times.
There are four patients files on GitHub:
? patients100.csv - 100 patients
? patients1000.csv - 1000 patients
? patients10000.csv - 10000 patients
? patients100000.csv - 100000 patients
These are all in the same format. For development you want to work with the smallest file, but your
code should work with the larger files as well.
Core Questions
Q1. Write a class to represent a Patient, so that each object holds one patient record
corresponding to one line in a .csv file. This should be a POJO class (plain old Java object), and is
just used for holding patient data, providing getter and setter methods. Think about how you store
the data - separate instance variables or would a data structure be better?
Q2. Write a class ReadCSV that provides methods to read a .csv file and return a List
data structure, add any private methods needed for the implementation.
Q3. Write a class JSONFormatter that provides methods to return a JSON representation of a
single patient and for all patients. The JSON should be well-formed. You have to write all the code
to generate the JSON yourself and cannot use a JSON library. As you will be doing a lot of String
manipulation investigate the StringBuilder class, as this is much more efficient at building strings
that the String class itself.
Q4. Write a class Model that does the following:
Has a readFile method that uses the ReadCSV class to read an input file and generate the
Patient objects.
Holds the list of Patient objects once they have been generated by the ReadCSV class.
Provides getter methods to access the patient data, for example, get a single JSON structure for
all patients, get a JSON structure for a single patient, get the names or ids for all patients, and so
on. Add these getter methods as you need them, including others that you find you need. Don’t
try to write them all first, only when you actually need a method!
Note, while working on Q1-4 you will want a temporary Main class so that you can compile, run
and test out the code you are writing. This class will probably keep changing, but that is normal!
2 of 3COMP0004 Part II Coursework
Q5. Write a GUI to create a simple dashboard application that runs on the desktop. The
dashboard should support at least the following:
Save a JSON format file, and the ability to read it back in again as an alternative to .csv format.
Display the list of patients in a list view, so that when one is selected the full patient information
is displayed.
Support searching by at least the patient name and ideally by other fields as well. Searches
can display multiple results.
Add additional functionality as you are able, such as simple statistics (e.g., average age or age
distribution), most common year of birth, and so on.
The GUI may be built in Swing, but you can use JavaFX if you want to. The emphasis is on
creating a straightforward and neat UI rather than something more extravagant!
The GUI, in one or more classes, should only contain code to handle input and display of
information. All other processing should be done by the other classes, each of which should focus
on one set of functionality. The UI itself should only make use of public methods in class Model to
connect with the rest of the code, and should not make direct use of the other classes.
Remember the principles of programming to an interface and Separation of Concerns, along with
keeping classes cohesive (i.e., focussed on one abstraction or one behaviour). You may find that
the Model class, at least, will need to be split into several classes as you add code, and you may
want to introduce one or more Controller classes to coordinate the interaction between the UI and
the Model class(es).
Challenge Questions
(These are hard, don’t worry if you don’t have time to do these questions, focus on Q1-5).
Q6. Add the ability to store the data in a SQL relational database.
Q7. On GitHub you will find a collection of data files with names ending in 100.csv. These provide
much more structured data for the patients100.csv file. Each file uses the patient ID as a key to link
patients records together. Extend your code from Q1-5 (and 6 if you have done it) to work with
these files, to provide a more complex dashboard for displaying and searching patient data. It is up
to you how much and what functionality you provide.
联系我们
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
站长地图
程序辅导网!