Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show output for the code aswell :) 1) Write a C++program that declares a class called find_letter. The class should have a function called

please show output for the code aswell :) image text in transcribed
1) Write a C++program that declares a class called find_letter. The class should have a function called first_find, another function called number_find, and a third function called print_stuff defined in the public section along with the constructor function that initializes the private data. The print_stuff function should be declared such that it cannot modify the private variable data. The private section should have a character variable holding the letter and a string variable containing the characters. The first_find function returns the first index of the letter within the string. The number_find function returns the number of occurances of the letter in the string. The print_stuff function prints the values from the private variables to the screen. Use these functions in the program to determine the number and location of a letter in a string of characters entered by the user and print the results to the screen. The string should be a continuous sequence of characters without spaces

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

Recommended Textbook for

More Books

Students also viewed these Databases questions