Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

A small mutual company wants you to create a program to randomly access the data on stocks it holds. Presently, the data are stored in a text file, each line of which contains the following: a stock code, which is an integer between 100 and 999; the stock's current price; the change in the stock's price since the last trading day; the highest price for the stock during the last year; 
and the lowest price for the stock during the last year.
Write a program that uses the text file to create a corresponding relative file. Translate the stock code to an appropriate relative record address. Then, the program should allow the users to randomly access the relative file. The user should be allowed to do the following:
a. Enter a stock code and then display all the information about the stock, appropriately labeled.
b. Add a new stock to the relative file.
c. Delete a stock from the relative file.
d. Change any of the data on the stock
Periodically, usually at the end of a trading day, the mutual fund company wants to update the relative file of stock data. Assume that the new data on the stocks is in a transaction file (stored as a text file) each line of which has the following data: the stock code and the new closing price.
The program could also update the relative file. The user could do the following for each record in the transaction file:
a. Make a current price of the corresponding record in the relative file equal to the new closing price.
b. In the corresponding relative file record, make the price change equal to the difference between the old current value and the new current value.
c. If the new current value is greater than the year's highest price, replace the year's highest price with the new current value.
d. If the new current value is less than the year's lowest price, replace the year's lowest price with the new current value. 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9639971

Have any Question?


Related Questions in Computer Engineering

Recall that s-des operates on a block size of 8 bits

Recall that S-DES operates on a block size of 8 bits, producing a ciphertext that is also 8 bits long. a. In this scenario, how many different ciphertexts are there? b. How many different 8-bit block ciphers can there be ...

Identify and evaluate at least three considerations that

Identify and evaluate at least three considerations that one must plan for when designing a database. Suggest at least two types of databases that would be useful for small businesses, two types for regional level organi ...

Start by assigning to variable answers a list containing an

Start by assigning to variable answers a list containing an arbitrary sequence of strings 'Y' and 'N'. For example: answers= ['Y','N','N','Y','N','Y','Y','Y','N','N','N'] Write Python statements corresponding to the foll ...

A static reference has the following two components in the

A static reference has the following two components in the JVM: The type of the reference; The fully qualified name of the reference, including its host class. From a security perspective for the JVM, investigate why sta ...

30 of the cars in a dealer lot are red 21 are black and 22

30% of the cars in a dealer lot are red, 21% are black, and 22% are white. The remainder are some other unspecified color. Salespersons randomly shows three cars to three different customers. What is the probability the ...

1 a cpu manufacturing company knows based on the machines

1. A CPU manufacturing company knows, based on the machines working at maximum productivity, that 90% of the CPU's coming off the line meet quality standards. The quality control inspector pulls 25 CPU's off the line to ...

You have 2 tasks to createer-modeling in ms visio simple

You have 2 tasks to createER-Modeling in MS visio. Simple jab for the database expert that would take him 30 min to finish. My requirement not only for the expert to get the task done. I need to do it myself. Then he cor ...

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

Question a description of the tasks and mechanisms that

Question: A description of the tasks and mechanisms that allow you to examine the existing system (a minimum of 3 different tools should be described) A description of conceptual, logical and physical data modeling A des ...

Salariestask compute the weekly pay for each employee at

Salaries Task: Compute the weekly pay for each employee at the Wahoo Widget Company. For each employee, you will calculate the base pay according to the appropriate salary category, and then subtract taxes and deductions ...

  • 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