Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this assignment is to have you write a C++ program that can be easily tested via automation. The grade for this will

image text in transcribed
The purpose of this assignment is to have you write a C++ program that can be easily tested via automation. The grade for this will be based on two things: 0 Does the program perform as expected ( does it have the appropriate behavior) 0 Have you followed the style guides discussed in class? The assignment. You are to write a program in C++ that: 1 Prompts for a filename to be read. The le will contain less than 100 space delimited integer values. 2 Load the integer values into an array in the order they are in the file. 3 Prompt the user for some action to be performed . The possible actions are: 111 _ 3 perform a number of operations based on the entry of the user '1' return the number of elements you read. '2' return the value at some index ( IE the user would enter '2 4' to see the value of the array at array[4] '3' Print out the entire array '4' exit the program If the user enters an invalid index it will respond "Invalid Index\" If the user enters an invalid command, the program will respond \"Invalid Input" Use the prompts in the sample output below. Note that after the command input, there MUST be a blank lines l IE std::end|) Your resources: Under files/homework/homeworkGO you will find This document An input file you can use for testing "test.txt\" A driver le { infile } that can be used to test the program A sample outfile file that Is the result of the instructors version of homeworkOO: homeworkOO outfile You should test that your output is identical to the provided output file. Note that for grading the input file, and data file will be different from what has been provided here. You will submit an ascii file 'homework00.cpp' that we will compile and test

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions