首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写program、代做R编程语言
项目预算:
开发周期:
发布时间:
要求地区:
HOMEWORK 9
This project is individual work. Each student must complete this assignment
independently.
User Request:
“Create a simple system to read, store, merge, purge, sort, search, and write data
using a complete array library, a linked list library, error checking, user
interaction, and providing fast lookup by suitable values.”
Objectives:
1 Use Java file IO to read and write files while using Java standard I/O (in and out) for
user interaction, using appropriate exception handling and giving appropriate error
messages.
5 points
2 Encapsulate primitive arrays inside a generic class that provides controlled access to
the array data, retains information on array capacity and use, and can be used to store
data of any class or primitive type. Integrate appropriate exception handling into the
MUarray class.
5 points
3 Efficiently sort and search the data based on the field specified by the user (using a
comparator).
5 points
4 Store data in a linked list maintained in order, sorted by RecordIDs. Add and remove
entries from the linked list while maintaining its order. Integrate appropriate exception
handling into classes that implement linked lists.
5 points
5 Create and use a hash table with RecordIDs as keys for efficient insertion and
retrieval of data based on RecordIDs. This hash table must store data within an array
and resize appropriately to maintain efficiency.
25 points
6 Encapsulate hash tables inside a generic class that provides controlled access to the
hash table data, retains information on hash table capacity and load factor, and can be
used to store data of any class or primitive type.
10 points
7 Handle collisions in the hash table using separate chaining implemented using your
OrderedMULinkedListclass.
10 points
8 Integrate appropriate exception handling into the generic hash table class. 5 points
9 Provide a design document explaining and justifying alternative implementation
choices for a hash table.
10 points
10 Develop and use an appropriate design. 10 points
11 Use proper documentation and formatting. 10 points
Description:
For this homework, you will revise and improve EV 2.0 from Homework 8 in one important way.
You are encouraged to reuse and build on your code from Homework 8. EV 3.0 will have the same basic
functionality as EV 2.0, but it will have one major change “under the hood”– because it is believed
that users will most often want to search for data by RecordID values, the list of RecordID values will be
used as keys to a hash table that stores pointers to the associated data. This will allow for data to be
looked up by RecordIDs in constant time, that is, in Θ(1) time, unless the hash table becomes too full or
the data are extremely skewed in some unlikely way. Of course, your table should resize if it becomes too
full. (Note that EV 3.0 will still store the list of data using linked list data structures during initial
reading, merging, and purging and will still store the list of data using your generic array for sorting and
searching using fields besides RecordIDs.)
Operational Issues:
From a user interface perspective, EV 3.0 will behave as described for EV 2.0, except that there will be
one additional data saving/display option, as follows.
“Enter (o)utput, (s)ort, (f)ind, (e)fficiency, (m)erge, (p)urge, (r)ecords,
(h)ash table, or (q)uit: ”
If the user enters ‘h’ for hash table display, EV 3.0 will list the data with RecordIDs in the order they are
stored in the hash table, each prepended with the bucket number (hash code) where it is stored, followed
by a colon. If a bucket is empty, the bucket number and colon should be skipped. If a bucket overflows,
the overflow items should be prepended with “OVERFLOW:” and be displayed in their overflow order
before proceeding to the next bucket. There should also be a blank line displayed between buckets. All
of this will be followed by a blank line, then a line giving some data about the hash table, namely, its
“base capacity” (the size of the array, not counting any overflow), its “total capacity” (the size of the
array plus any separate chaining links used for overflow), and its load factor. This is immediately
followed by the usual line stating the number of data lines read, etc. As with the other data
saving/displaying options, if the user enters ‘h’ for hash display, EV 3.0 will prompt for an output
filename and send the output to the standard out console if no file name is provided. Note that this is
thought of as a debug display as it is unlikely to be of use to an end user but may help you to debug your
project.
Implementation Issues:
In most areas, EV 3.0 will be implemented just as EV 2.0. This includes how EV reads files and
prints data, carries out user interaction via standard in and standard out, encapsulates arrays, how
exception handling is implemented for arrays and similar classes, and how the list of records is
stored in a linked list when data is initially read in and when it is being merged and purged. The big
implementation change will be the data structure used in the code to find data based on RecordID values.
For EV 3.0, you are no longer allowed to sort and search by RecordIDs using the array, you need to use a
hash table instead. This hash table will use an array of OrderedMULinkedLists to hold the data and
resolve collisions through separate chaining. For this hash table, we will keep the hash function simple
by using RecordIDs and wrapping RecordIDs that are too large for the array using modulus table
capacity. However, to avoid too many collisions for likely data subsampling, we will make the table
capacity always a prime number, following a predefined resizing schedule. The table will resize to the
next larger size in the schedule when it exceeds its maximum load factor (which will have a default value
of 90% but should be able to be set to other values via a constructor), and resize down to the next smaller
size in the schedule when it falls below its minimum load factor (which will have a default value of 40%
but should be able to be set to other values via the same constructor).
Of course, many alternatives could be selected for hash table implementations. For this reason, you
should include a design document with your submission. Please make this a PDF file and name it “EV 3
Design.pdf” in your submission. In this document, you should describe one alternative hash function
you could have chosen and one alternative collision resolution strategy that you could have chosen,
along with a brief analysis of how these alternatives would influence the complexity and efficiency
of your code.
Note that when you first create your hash table in EV, you will know the amount of data it is to contain.
This is because you will wait to create it until you have read the first file of data. Similarly, when you
merge or purge data, you will use your adjusted list to create a new hash table for the adjusted amount of
data. This means that when EV creates a new hash table, it should specify this value. However, your
member function for adding entries to the hash table should be capable of automatic resizing if the table
exceeds the maximum load factor or falls below the minimum load factor.
Be sure to use all developed code, use efficient mutator methods (e.g., don’t make new arrays
unless doubling or halving the array), and check whether memory is available on the stack when using
new in your MUArray, OrderedMULinkedList, and MUHashTable classes and throw
OutOfMemoryError if no space is available.
Be sure to use a good object-oriented design in this project. That includes the appropriate use of
encapsulation, inheritance, overloading, overriding, accessibility modifiers, etc.
Be sure to use good code documentation. This includes header comments for all classes and methods,
explanatory comments for each code section, meaningful variable and method names, consistent
indentation, etc.
You may write your program from scratch or start from programs for which the source code is freely
available on the web or through other sources (such as friends or student organizations). If you do not
start from scratch, you must give a complete and accurate accounting of where your code came from
and indicate which parts are original or changed and which you got from which other source. Failure to
give credit where credit is due is academic fraud and will be dealt with accordingly.
Submission:
You must submit an electronic copy of your code to the appropriate homework submission link
over the blackboard. You must also submit the Homework Summary Document CS 210.docx with
your submission.
Submission Process for All Assignments: 1) Make sure that the file path for reading and writing is given by
the user as input by using Scanner etc. (should not be hardcoded in your code). 2) Before submission, make
sure that your code is working from the command line by compiling and running without issues as you type
"javac" to compile and "java" to run the compiled file. If your code does not run from the command line or
compile, you will get 0. Running JUnit test source code from the command line can be tricky. You do not
need to run JUnit source files from command lines.
软件开发、广告设计客服
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
软件定制开发网!