Question: Write An Array Application [ MyStaticArray . cpp ] Write MyStaticArray.cpp using your StaticArray template. Use your already - tested and verified H file from
Write An Array Application MyStaticArraycpp
Write MyStaticArray.cpp using your StaticArray template. Use your alreadytested and verified H file from part
Exactly as in Programming Assignment s MyArray.cpp this app lets its user enter as many values as they like, and when that process is completed, lets the user look up values by matching index. Except that these values are doubles. Use a StaticArray object of capacity to track the values.
In a loop, the app should prompting the user to enter a pair of numbers on the same line: a whole number index and its corresponding floating point value. Do not validate input in the app, because your template should handle outofrange indexes, and it should allow overwriting an alreadyentered index. Quit the loop when an uppercase or lowercase Q is entered for either the index or the value. Indexes can be entered in any order they don't have to start with zero and go up by one thereafter. It's whatever the user enters.
Your app should keep track of which indexes got entered. Use a bool StaticArray for that.
After all data entry is complete, the app should:
output how many unique indexes got entered,
output the list of all used indexes and their values, per the example below, and
implement an eventcontrolled loop that prompts for an index value and outputs whether the index is in use or not, and if in use, what is the value stored for that index. Loop until the user elects to stop by entering uppercase or lowercase Q
Here's a sample of how this should work user input in blue:
Input an index and a value Q to quit:
Input an index and a value Q to quit:
Input an index and a value Q to quit:
Input an index and a value Q to quit: x
Input an index and a value Q to quit:
Input an index and a value Q to quit:
Input an index and a value Q to quit:
Input an index and a value Q to quit:
Input an index and a value Q to quit: q
You stored this many values:
The indexvalue pairs are:
Input an index for me to look up Q to quit:
Found it the value stored at is
Input an index for me to look up Q to quit:
I didn't find it
Input an index for me to look up Q to quit:
Found it the value stored at is
Input an index for me to look up Q to quit:
I didn't find it
Input an index for me to look up Q to quit:
I didn't find it
Input an index for me to look up Q to quit: Q
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
