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 a class for services offered by a hair-styling salon

Create a class for services offered by a hair-styling salon. Data fields include a String to hold the service description and write an application named Salon Report that contains an array to hold six Service objects and fill it with the data

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  Write a recursive function that finds and returns the sum

Write a recursive function that finds and returns the sum of the elements of an int array. Also, write a program to test your function.

  Picky publishing house publishes stories

Picky Publishing House publishes stories in three categories and has strict require- ments for page counts in each category. Create an abstract class named Story that includes a story title, an author name, a number of pages, and a String message. In..

  Build the gui layout of the game

Build the Build the GUI layout of the game in java.

  Java program by array

Write a program that reads in a file that contains one integer per line. Each integer represents one location in the image. Assume that there are 64 rows and 64 columns in the image

  Development of a simple program involving multiple classes

Development of a Simple Program Involving Multiple Classes and development of a basic Class, development of the Country and World classes

  Write complete java program to read from keyboard

Write complete Java program to read, from keyboard, a student's first and last name and six grades. It will display on screen last name then first letter of first name with a period.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

  Examples of cultural productions from three cultures

Using specific examples of cultural productions from three cultures -Sumerians, Archaic Greeks (800-480 BCE), Classical Greeks (480-323 BCE)- explain how cultural values and ideals are reflected in the creation and style of cultural productions.

  Develop a complex web site

Develop a complex web site or piece of multimedia from scratch, using information gathering and design techniques;

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