
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
![Write a C++ program which has three classes. The first class is INPUT, which has a char type
of array, name[]. Also, it has a member function called show to take any number of characters
into the array, name. The second class, COUNT, which also has a member function called show
to count and print the total number of characters, number of vowels and number of consonants
into the array, name. The third class, REVERSE which also has a member function called show
to print the characters into the name in reverse order.
Expected output of your program is as follows:
Contents of the array, name: MOHINI
Total Number of characters: 6
Total number of vowels: 3
Total number of consonants: 3
Reverse of the characters into the array, name: INIHOM
You can take any types/numbers of variables as required for your program. Also, to
implement the program use friend class.](https://content.bartleby.com/qna-images/question/e2f788e8-54a9-4691-bd46-656446e45c0f/4470cc92-d17f-4418-b969-42eb195ce603/cj7grtu_thumbnail.png)
Transcribed Image Text:Write a C++ program which has three classes. The first class is INPUT, which has a char type
of array, name[]. Also, it has a member function called show to take any number of characters
into the array, name. The second class, COUNT, which also has a member function called show
to count and print the total number of characters, number of vowels and number of consonants
into the array, name. The third class, REVERSE which also has a member function called show
to print the characters into the name in reverse order.
Expected output of your program is as follows:
Contents of the array, name: MOHINI
Total Number of characters: 6
Total number of vowels: 3
Total number of consonants: 3
Reverse of the characters into the array, name: INIHOM
You can take any types/numbers of variables as required for your program. Also, to
implement the program use friend class.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a C#program that uses a class called ClassRegistration as outlined below: The ClassRegistration class is responsible for keeping track of the student id numbers for students that register for a particular class. Each class has a maximum number of students that it can accommodate. Responsibilities of the ClassRegistration class: It is responsible for storing the student id numbers for a particular class (in an array of integers) It is responsible for adding new student id numbers to this list (returns boolean) It is responsible for checking if a student id is in the list (returns a boolean) It is responsible for getting a list of all students in the class (returns a string). It is responsible for returning the number of students registered for the class (returns an integer) It is responsible for returning the maximum number of students the class is allowed (returns an integer) It is responsible for returning the name of the class. (returns a string) ClassRegistration -…arrow_forwardThe code is in C++arrow_forwardComputer Science Create a class that will store a list of names. Your class needs to include a function that will return the name that appears first aphabetically, and another function that should return the name that appears last alphabetically. You also need to include a function that will sort the list alphabetically. The class does not need to be case insensitive.arrow_forward
- Using C++ Write a C++ program which uses a class that contains the following members: the name of a student, one midterm score, one final score, and one lab project score. The class also contains a member function that finds the average of the three scores and displays a grade based on that average (A for 90 and above, B for 80 and above, C for 70 and above, D for 60 and above, and F for anything less than 60). The class also contains a member function that displays a pass if the grade is D or above. Your program using overloading prints the grades of students, and names of the students.arrow_forwardUsing C++ programming language solve the following questionarrow_forwardI need help writing a C++ code.arrow_forward
- paste indedte code....need help with C++arrow_forwardusing c++ define a class fruitType to store the following data about a fruit: Fruit name (string), color (string), fat (int), sugar (int), and carbohydrate (int). Declare a pointer of type fruitType to store the following data: Fruit name—banana, color—yellow, fat—1, sugar—15, carbohydrate—22. Write a member function, setFruitInfo to store data into a variable of fruitType. Write a member function, getFruitInfo to get data from a variable of fruitType. Write a member function, printFruitInfo to output data stored into a variable of fruitType. Use appropriate labels to identify each component. Test your solution by calling all funtions using the pointer.arrow_forwardSubmit code in C++ CODE with comments and output screenshot is must to get Upvote. Thanksarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education