Question: Help Please CSC 118: Programming Fundamentals Lab 7: Programming assignment Programming assignment 1 (Multiway Branching): Exercise 1: As Quiz Exercise 2 demonstrated, program Switches is

Help Please
 Help Please CSC 118: Programming Fundamentals Lab 7: Programming assignment Programming

CSC 118: Programming Fundamentals Lab 7: Programming assignment Programming assignment 1 (Multiway Branching): Exercise 1: As Quiz Exercise 2 demonstrated, program Switches is not very robust. Add the code necessary to allow the program to work properly with both lowercase and uppercase versions of the input letters. Run your program with the same data, but type in the letters as lowercase. Exercise 2: Program Switches is still not very robust. Add a default case that prints an error message and asks for the letter to be reentered. Test your program with the same data set, but add several letters that are not correct Exercise 3: Program CounMarks is the shell of a program that counts all the punctuation marks in a file. // Program CountMarks counts punctuation marks in a file. #include #include using namespace std; int main () ifstream inData; char symbol; int periodct e; int commaCt e; int questionct ; int colonct=0; int semicolonCt ; inData.open("switch.dat"); FILL IN / return 0; Fill in the missing code and run your program. Show the counts in the following table. Periods:- Commas: Semicolons: Question marks: Colons: Exercise 4: Add the code necessary for program CountMarks to count blanks as well. How many blanks are there in file switch.dat? If you did not get a count of 12, go back and check your program. Turn in: Your code for Exercises 1 and 2 and your code for Exercises 3 and 4. CSC 118: Programming Fundamentals Lab 7: Programming assignment Programming assignment 1 (Multiway Branching): Exercise 1: As Quiz Exercise 2 demonstrated, program Switches is not very robust. Add the code necessary to allow the program to work properly with both lowercase and uppercase versions of the input letters. Run your program with the same data, but type in the letters as lowercase. Exercise 2: Program Switches is still not very robust. Add a default case that prints an error message and asks for the letter to be reentered. Test your program with the same data set, but add several letters that are not correct Exercise 3: Program CounMarks is the shell of a program that counts all the punctuation marks in a file. // Program CountMarks counts punctuation marks in a file. #include #include using namespace std; int main () ifstream inData; char symbol; int periodct e; int commaCt e; int questionct ; int colonct=0; int semicolonCt ; inData.open("switch.dat"); FILL IN / return 0; Fill in the missing code and run your program. Show the counts in the following table. Periods:- Commas: Semicolons: Question marks: Colons: Exercise 4: Add the code necessary for program CountMarks to count blanks as well. How many blanks are there in file switch.dat? If you did not get a count of 12, go back and check your program. Turn in: Your code for Exercises 1 and 2 and your code for Exercises 3 and 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!