Ask Computer Engineering Expert

Question: 

Objective: Use structures and pointers to create linked lists. Use knowledge of pointers to modify linked lists. Implement a recursive function.

Problem: FreePlay Arcade in Richardson has a primitive flat file database that needs to be updated. This database contains the names, high scores (w/ initials) and the total number of plays of their games. The database also contains the total amount each game would earn if not on free play. You will build a simple interface to interact with the database.

Details: The interface will provide the following options:

1. Add a record to the database

2. Search for a record and display it

3. Edit a record

4. Delete a record

5. Sort records

Add a record: Create a new node and add it to the database

Search for a record: The search term will be a word or phrase. Search through the entries and display the complete record for any game that matches the search term.

Edit a record: With a given game name, the program should update the record and confirm the change by displaying the new record on the screen. The following items can be edited:

1. High score

2. Initials

3. Number of plays

If number of plays is edited, the revenue should be recalculated

$0.25 per play

Delete a record: User will enter a game name. The program should delete the record from the file. The best way to do this is to delete the record from the linked list.

Sort records: The records can be sorted in ascending order (A -> Z or increasing numerically) by either name or number of plays.

Input will come from a batch file. Output will be written to a file.

The linked list will be written to the database file at the end of the program

No need to remove and rename when a delete is performed

All records are stored in memory with a linked list of structures

All manipulation to the database should happen within the linked list, not the output file

When deleting - if a record does not exist, write an error message to the log file

Expect that some test cases will involve there being no inventory.dat file at execution

Validate all input into the program

No need to validate name as it can be practically anything

Write error messages to the log file if invalid input is encountered and ignore the command

Be prepared for anything in terms of user input

Error messages written to the output file should be in ALL CAPS.

Database Format: The database file will be named freeplay.dat. Each record in the database will be on a single line with the following format. Each field will be separated by a comma and a space

, , , , <\n>

- may be multiple words

- 9 digits

- 3 characters- no white space

- 4 digits- will have leading zeroes if value less than 1000

- <4 digits><2 digits> - will have leading zeroes if first four digits less than 1000

Input: All input will be file based. You will create a batch file to use with the database. The format for each option is listed below:

Add a record

1 "name" high_score initials plays $revenue<\n>

Search for a record

2

2 Search term may contain spaces

Edit a record

   3

  

1 = high score

2 = initials

3 = number of plays

New value may not contain leading zeroes

Delete a record

4

Name may contain spaces

Sort records

   5

A single word should follow the value: name or plays

Output: Each command in the input file will generate output to a file named freeplay.log. The output for each command is as follows:

Add a record

RECORD ADDED

Name:

High Score:

Initials:

Plays:

Revenue: mce_markerlt;value> - formatted to 2 decimal places

Search for a record

FOUND or NOT FOUND

If found

High Score:

Initials:

Plays:

Revenue: mce_markerlt;value> - formatted to 2 decimal places

Edit a record

UPDATED

UPDATE TO - VALUE

Name:

High Score:

Initials:

Plays:

Revenue: mce_markerlt;value> - formatted to 2 decimal places

Delete a record

RECORD DELETED

Name:

High Score:

Initials:

Plays:

Revenue: mce_markerlt;value> - formatted to 2 decimal places

Sort records

RECORDS SORTED BY

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91878244
  • Price:- $45

Priced at Now at $45, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As