Use 1 buffer named InBuf to hold the text inputted by the user. Use another buffer named Count… 1 answer below »

Hwk 5.docx

Assigned: Mon, 15 April 2019

Due: Mon, 6 May 2019

Write a character counting program that allows the input of up to 132 characters.

Use 1 buffer named InBuf to hold the text inputted by the user. Use another buffer named Count to hold the character count. Use a constant MAX of 132 for the size of the input buffer. For the Count buffer, you may either use a single array of 123 characters (Will accommodate a-z, A-Z, and 0-9), or 3 arrays (26, 26, 10) for a-z, A-Z, and 0-9. Refer to hint at bottom of this page.

This will be a mixed mode C++ and Assembly program. You will not be using the Irvine Library.

Use a standard C++ project except you will need to enable MASM in the build customizations

A .h file is required.

Your program will have a menu that will look like this

(I)nput your text

(C)ount the characters

(D)isplay

You will have a C++ function named InputData to input the original text to count.

You will use assembly code in a C++ function named CountText that will count and store the number of lower case letters (a-z), the upper case letters (A-Z) and any numbers (0-9) along with the number times that letter or number occurs. Finally, you will have a C+ function named DisplayText that will display the original text and the character counts. You are only to count lower case letters (a-z), upper case letters (A-Z) and numbersd (0-9).

ASCII letters have associate decimal values associated with them

a – 97d b – 98d z – 122d

A – 65d Z – 90d

0 – 48d or 30h

9 – 57d or 39h

Hint: You can initialize the count buffer to all zeros and use the value of the character to increment the buffer index contents.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now