Download presentation
Presentation is loading. Please wait.
1
Class Examples
2
Example 1 Write a program as the following :
Class called initials containing: a private string to store the name Constructor to set the name to empty string Function to set the name Function to print the initials in capital letters. In the main ask the user to enter the name And print the initials Example 1
3
Output Example : Hint
4
Example 2 Write a program as the following : Class called following :
Function follow take a sting and print the following letter for each character . In the main ask the user to enter the string Output example: Example 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.