Prepare worlddataapp project it implements the nameindex

Assignment Help JAVA Programming
Reference no: EM13346790

Prepare WorldDataApp project. It implements the NameIndex portion, including:

• creating it (implemented as a Binary Search Tree (BST)) in SetupProgram, and
• searching, viewing and updating it in UserApp program.

A third program, PrettyPrintUtility, displays the backup index file so the developer (and grader) can easily view the file in a nicely-aligned printout. NameIndex is created as an internal data structure - so in order to "move it" from one program execution to another (i.e., from SetupProgram to UserApp, and from UserApp today to UserApp tomorrow), it is saved and re-loaded to/from a backup file.

So there are 3 physically separate programs, all within a SINGLE Java/C# project:

1. SetupProgram - creates the internal NameIndex based on data in the RawData file - and saves it to the Backup file

2. UserApp - loads the NameIndex from the Backup file, then processes the transactions in Trans file, sending output to the Log file, then saves the index to the Backup file

3. PrettyPrintUtility - reads/prints the Backup file to the Log file

There are 4 data files used in the project:

1. RawDataTester.csv (input to SetupProgram - I'll provide this file)

2. NameIndexBackup.txt (output from SetupProgram, input/output for UserApp and input to PrettyPrintUtility)

3. Log.txt (all 3 programs output to this file)

4. TransData.txt (input to UserApp - I'll provide this file)

Batch processing (vs. interactive processing) is used to facilitate testing and the capture of the programs' executions for submission for grading. That is, all 3 programs write to the Log file, and user transaction requests to UserApp come from the TransData file - rather than the console or a Windows or Web form.

Object Oriented Programming (OOP paradigm) must be used for SetupProgram and UserApp programs. But since it's just a quickie developer-utility program, PrettyPrintUtility just uses the traditional Procedural Paradigm (PP) approach.

So there are 3 classes (besides the 3 main programs):

1. RawData handles all file/record/field handling for the RawData file. It's only used by SetupProgram.

2. NameIndex handles everything to do with the internal name index and its backup file.

This class is used by both SetupProgram and UserApp.

3. UserInterface handles everything to do with batch processing including anything to do with the Log file and the TransData file. This class is used by both SetupProgram (for Logging) and UserApp (for getting TransData and for Logging).

A program is a physically separate chunk of code in its own .java (or .cs) file that contains its own main (or Main) method as the execution starting point. It is independently compile-able and independently executable.

So SetupProgram, UserApp and PrettyPrintUtility can each be run individually by the developer completely on their own. The programs must, of course, be run in the correct order - i.e., SetupProgram must be run before UserApp or PrettyPrintUtility.

OOP - Information hiding

The 3 class NAMES and the PUBLIC METHODS each describe WHAT the object is and its functionality to the "outside world", WITHOUT specifying HOW the underlying storage or interaction will be implemented. The code in the 2 actual programs which use the 3 classes are NOT at all aware of:

WHERE the RawData field values come from (A data file? Interactive users? A database? A bar-code scanner?) nor HOW it was derived (Any transformations? Record-splitting into fields? Field editing after reading from text-boxes? Floats changed to integers? Metric changed to imperial measures? Field-values calculated or read-in from storage?)
HOW the NameIndex data is stored/accessed (a BST? An ordered list? A hash table?) nor whether it's an internal or external structure or even an actual database or the cloud
HOW the UserInterface is implemented (Batch processing? Interactive using the Console? A Windows or Web front end?)

This makes OOP programs easy to change since all code changes are done within the class, with no changes to the main program code (e.g., batch input/output can be changed to a web app by altering the code in UserInterface - NameIndex could be changed to use an external HashFile rather than an internal BST - RawData could be read from a database rather than a data file).

Reference no: EM13346790

Questions Cloud

The so2 concentration in a stack is 400 ppm the stack : the so2 concentration in a stack is 400 ppm the stack diameter is 10 ft and the stack gas velocity is 50 ftsec. the gas
A company makes use of a computerised flat file information : a company makes use of a computerised flat file information retrieval and storage system. the company is experiencing
1 every convergent sequence contains either an increasing : 1 every convergent sequence contains either an increasing or a decreasing subsequence.?proof suppose that limas n goes
Dissect an email you have received first get the original : dissect an email you have received. first get the original ascii text of the email including the headers and the blank
Prepare worlddataapp project it implements the nameindex : prepare worlddataapp project. it implements the nameindex portion includingbull creating it implemented as a binary
The theory of the businessin a thought-provoking article in : the theory of the businessin a thought-provoking article in the septemberoctober 1994 edition of the harvard business
Question security infrastructure and protocols a pki and : question security infrastructure and protocols a. pki and pgp are two methods for generating and managing public keys
Determine several resources available from the small : determine several resources available from the small business administration sba for entrepreneurs that might be useful
Question 1 let npq where pq are primes of the same length : question 1 let npq where pq are primes of the same length and let phi be eulers totient function. consider the

Reviews

Write a Review

JAVA Programming Questions & Answers

  Explain the legal doctrine benefits balancing

Explain the legal doctrine "Benefits Balancing" as it pertains to applying the reasonable standard of care doctrine in the medical fields. Does a defense that the majority of physicians normally do not give a particular diagnostic test in the normal ..

  Cognitive-based approaches to understanding motivation

Compare and contrast the need-based and cognitive-based approaches to understanding motivation?

  Write a method named validate to help a local banker

write a method named validate to help a local banker. Your method will need to utilize two input parameters and the method's return value (for its output).

  Java program that will add the corresponding elements

Develop a Java program that will add the corresponding elements of two 1-dimensional arrays X and Y to produce the 1-dimensional array Z. Arrays X, Y, Z have the same dimension [M].

  These test scores into an array and computes:

Write a program that reads these test scores into an array and computes:Sum of the test scores after dropping the minimum test scoreAverage of the test scores

  Write java program to accept two words as input

Write a Java program that accepts two words as input and determines if one of them is resulting from changing the order of the others' letters.

  Elements from a html document

Function test Count List Elements should simply retrieve an array of all list elements on the page and assert that their total count is 3.

  Consider a company that wants to keep track of its employees

Consider a company that wants to keep track of its employees, their positions and their telephone numbers. Your development team has developed a simple prototype using the Java code found in EmployeeDirectory.zip.

  Displays every perfect number from 1 through 1000

Write an application that displays every perfect number from 1 through 1000. A perfect number is one that equals the sum of all the numbers that divide evenly into it.

  Length of the string in order to reserve space

To determine the length of the string in order to reserve space for the new string use the library routine strlen. Register a1 contains a pointer to the string to measure and on return register a1 has the number of characters in the string. You..

  Write a method called printlevel

Write a method called printLevel that takes an integer n as a parameter and that prints the values at level n from left to right. The values should be printed one per line.

  Create and code a program uses three parallel numeric array

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays. The program should prompt the user to enter a ProductID. Valid P..

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