2023 CSE 224 Programming Assignment 4B INTRODUCTION This assignment is optional and can be used to replace your PA4 grade this | Assignment Collections

Computer Science 2023 CSE 224 Programming Assignment 4B

2023 CSE 224 Programming Assignment 4B INTRODUCTION This assignment is optional and can be used to replace your PA4 grade this | Assignment Collections

CSE 224 Programming Assignment 4B

INTRODUCTION

This assignment is optional, and can be used to replace your PA4 grade this term. I’m not intending this primarily as a way to raise your grade: it’s intended as an opportunity to get better at programming, especially modularizing code, if you’re having trouble with that.

 

 

You’ll be creating a menu-driven main program for processing strings, but you’ll do this by first writing a set of functions, and then using those functions inside a main program.

Specific deliverables and deadlines will be given for each piece of this assignment. You must complete and submit each piece by the given deadline. Missing any deadline will disqualify you from further consideration on this assignment (in other words, your entire assignment will be graded based only on what you’ve submitted up to that point).

Submissions will be in the form of a PDF file, showing:

• your well-commented source code;

• its behavior on the given test cases; and

• its behavior on two additional test cases of your own choosing.

Specific commenting guidelines will be given below, and proper commenting will form an essential part of your grades.

 

PROGRAM OVERVIEW

Here is an overview of the program you’ll be writing. The next section will discuss how you should develop your program.

Functions

Write the following functions. Each of these functions should have a single parameter — accepting a c-style string as an argument.

 

The function should only do what is specified (note that none of these functions do any output to the screen):

 

1.Write a function that counts and returns the number of vowels in the string. (For the purposes of this exercise, we are talking about the standard 5 vowels — A, E, I, O, U

(upper- or lower-case)).

 

2.Write a function that counts and returns the number of consonants in the string.

 

3.Write a function that converts the string to all lowercase.

 

4.Write a function that converts the string to all uppercase.

 

Main Program

Write a main program that performs the following steps:

 

1.Prompt the user to enter a string, and let them type it in.

This could be an entire sentence, with the newline indicating the end of the string. You may assume the string will be no

more than 100 characters, so declare your array accordingly.

 

2.Display the following menu:

A) Count the number of vowels in the string

B) Count the number of consonants in the string

C) Convert the string to uppercase

D) Convert the string to lowercase

E) Display the current string

F) Enter another string

M) Display this menu

X) Exit the program

 

3.Enter a loop, allowing the user to type in a menu choice each time. Loop should continue until the user enters the command to exit. Upper and lowercase letters should be allowed for the menu choices. If more than one character is entered, only use the first character.

•When the A or B commands are entered (counting vowels or consonants), call the corresponding function, then print the result

•When the C or D commands are chosen, just call the appropriate function to convert the string. Do not do any output from main on these commands.

•When E is chosen, print the contents of the stored string.

•When F is chosen, allow a new string to be typed – this will replace the previous one.

•If an unknown command is entered, display the message

“Unknown Command: enter M for help”

•The menu should only be displayed once at the start, and then again whenever the M option is selected Sample Run (user input is underlined, to distinguish it from output):

Input a line of text, up to 100 characters:

> The quick brown fox jumped. The lazy dog, he was jumped over.

A) Count the number of vowels in the string

B) Count the number of consonants in the string

C) Convert the string to uppercase

D) Convert the string to lowercase

E) Display the current string

F) Enter another string

M) Display this menu

X) Exit the program

Enter your menu selection: a

Number of vowels: 16

Enter your menu selection: B

Number of consonants: 31

Enter your menu selection: c

Enter your menu selection: e

The string:

THE QUICK BROWN FOX JUMPED. THE LAZY DOG, HE WAS JUMPED OVER.

Enter your menu selection: D

Enter your menu selection: E

The string:

the quick brown fox jumped. the lazy dog, he was jumped over.

Enter your menu selection: f

Input a new line of text, up to 100 characters:

> Mary Had A Little Lamb. His name was Fleecy Pete.

Enter your menu selection: C

Enter your menu selection: e

The string:

MARY HAD A LITTLE LAMB. HIS NAME WAS FLEECY PETE.

Enter your menu selection: d

Enter your menu selection: E

The string:

mary had a little lamb. his name was fleecy pete.

Enter your menu selection: b

Number of consonants: 24

Enter your menu selection: a

Number of vowels: 14

Enter your menu selection: x

Goodbye

DEVELOPMENT REQUIREMENTS

The way in which you develop your program is an important part of

your grade. The assignment coinsists of four deliverables, as

 

specified on the following pages.

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational