A this adds storage of the maindata as an external random

Assignment Help JAVA Programming
Reference no: EM13346714

A. This adds storage of the MainData as an external random access file with id as key to allow ListAll and Query transactions based on id. It also still allows ListAll and Query transactions based on name (using NameIndex) to show the actual data rather than just id (as A1 did).

B. A2 uses binary files (rather than plain ASCII text files) for both MainData file and NameIndexBackup file. NameIndex's save and load methods will thus need changing to accommodate a binary file. And PrettyPrintUtility also has to be changed and extended to deal with these two binary files.

C. Because there is now a lot more processing needed for each raw data record, RawData class must be changed. It will now handle only things pertaining to the RawData FILE, per se (i.e., open it in the constructor, close it in FinishUp method, read a single record/line in InputOneCountry method). The NEW RawDataRecord class (in a physically separate code file) will handle splitting the record into fields, the actual field storage itself, and the appropriate getters and setters for cleaning/converting the fields, as appropriate.

D. This new class provides ready-built services and storage for use by UserApp when processing IN transactions since the restOfTransRecord is exactly the same as a raw data record/line.

E. There will now be additional transaction types and additional transaction handling.

1) New transaction types: LI (ListAllById), QI (QueryById), DI (DeleteById). [DI is a dummy stub, like DN]. LI and QI handlers are in MainData class.

2) IN transactions will now need to call both InsertCountry (in NameIndex class) and InsertCountry (in MainData class).

3) LN (ListAllByName) and QN (QueryByName) transaction handlers (in NameIndex class) will have to call InputThisRecord (in MainData class), supplying the id found in the name index.

F. The actual MainData record will be displayed to the user (in Log file) for LI and QI transactions as well as for LN and QN transactions (via InputThisRecord).

PrepareRecForDisplay (in MainData class) nicely formats the fields into a nice string for UI's WriteThis.

G. An AutoTesterUtility program will be used to automate testing and the demo.

H. Name is now a 15-char string in nameIndex (truncated or space-filled on the right, as needed) since that's how it's stored in the MainData file

RawDataRecord class

This is a NEW class, added for A2. It contains storage for each individual field in the record (NOTE: you only need to specify those needed eventually in the MainData file - see below) It also contains the getters/setters to the necessary cleaning/converting of those fields (e.g., removing excess quote characters, generating id's, truncating/padding some strings to fixed size, converting some strings to integers/floats, etc.). This class provides a public method to ConvertRecToAppropFields which controls the processing of a single record (line) into the properly-configured individual fields.

SetupProgram can then use the appropriate getters (as parameters) when it calls the 2 InsertCountry methods (1st for mainData, 2nd
for nameIndex) - after it calls rawData (file)'s InputOneCountry method (which itself calls rawDataRecord's ConvertRecToAppropFields, supplying it with the wholeRecordAsABigString as a parameter).

Similarly, UserApp can call rawDataRecord.ConvertRecToAppropFields in the IN transaction handler (in the big switch statement) before calling the 2 InsertCountry methods.

Reference no: EM13346714

Questions Cloud

Suppose a movie database in which data is recorded about : suppose a movie database in which data is recorded about the movie industry. the data needs are summarized as follows
Part 1 - energy in the home personal energy use and home : part 1 - energy in the home personal energy use and home energy efficiency.estimate your personal annual energy usage
Brent bonnin begins his senior year of college filled with : brent bonnin begins his senior year of college filled with excitement and a twinge of fear. the excitement stems from
Create a application using the mvc architecture no : create a application using the mvc architecture. no scripting elements are allowed in jsp
A this adds storage of the maindata as an external random : a. this adds storage of the maindata as an external random access file with id as key to allow listall and query
Question 1nbspnbsp a large shipping company recorded the : question 1nbspnbsp a large shipping company recorded the number of tons shipped weekly across the pacific for 50
Please read the : please read the following
Develop a marketing plan on a product or service and : develop a marketing plan on a product or service and describe product applications in marketing role of internet in
A the rising stock market implies an increase in wealth at : a the rising stock market implies an increase in wealth at least as measured on paper. if we assume that some of this

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create and implement class called date to store month

Create and Implement the class called Date which has data members to store month (as a number), day, year, and name of month.

  Java method that contains code to be executed

Write a short Java method that contains code for which it is probably impossible for that code to ever be executed, but your favorite Java compiler does not detect this fact.

  Write a program that asks the user to enter three names

Write a program that asks the user to enter three names

  Overview in this assignment you are provided with an

overview in this assignment you are provided with an interface that contains a generic type.you are asked to create two

  Initialized the array of words by an assignment statement.

modify the following program . The program from Lab 4 initialized the array of words by an assignment statement.

  Define an adt for character strings.

Define an ADT for character strings. Your ADT should consist of typical functions that can be performed on strings, with each function defined in terms of its input and output. Then define two different physical representations for strings.

  Write java program to store employee id number

Use employee data file called employees.txt should comprise at least 5 employee records. Each record stores employee ID number (six digits) last name, first name, middle inital,gender(m or f).

  Project socket programming - udp objectives - learn socket

project socket programming - udp objectives - learn socket programming in java udp-nbsp cement your understanding of

  Construct the student class student.h

Construct the Student Class Student.h and Student.cpp student class should include a Student.h header file for your class definitions and a Student.cpp implementation file comprised of first name, last name, ram id

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Create java servlets

Create a new JSON "view" (e.g., a JSP page that only displays the JSON representation of the data)

  Declare another television object called portable

Add to the comment header as indicated at the top of the program.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd