Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are asked to develop a Title Display Label program to print a given label to the screen in different shapes according the following requirements:
You are asked to develop a Title Display Label program to print a given label to the screen in different shapes
according the following requirements:
Your program will read a text from the user and print this label in different shapes for a display screen.
o The program can print the text character by character in forward way.
e.g. if the text is JUST UNIVERSITY then the following text will be printed out:
J *U*S*T U*N*I*V*E*R*S*I*T*Y
o The program can print the text character by character in backward way.
e.g. if the text is JUST UNIVERSITY then the following text will be printed out:
Y*T*I*S*R*E*V*I*N*U T*S*U*J
o The program can print the text after shifting the first word to the end of the text.
e.g. if the text is JUST UNIVERSITY then the following text will be printed out:
UNIVERSITY JUST
o The program can print the text by keeping the odd characters in their place and reverse the
place of even characters:
e.g. if the text is JUST UNIVERSITY then the following text will be printed out:
J*T*S*S E*N*I*V*U*R*T*I*U*Y
Programing Specifications:
1. Your are asked to develop a class named titleLabel with the members described in the following
UML diagram:
class titleLabel
- title: string
+ titleLabel ( ) :
+ readTitle ( ): void
+ printForward ( ) const: void
+ printShifted ( ) const : void
+ printRevered ( ) const: void
Assignment#2
A class constructor to initialize the title member to empty string.
The readTitle function to input a text from the user and set it to title member.
The printForward function that will print the characters in forward order.
The printBackward function that will print the characters in backward order.
The printShifted function to print the title member after shifting the first word to the end of the
text.
The printReverse function to print the title member after reversing the even characters.
Important Notes:
You are asked to implement the all the print functions using stack and queue objects only, any other
structures are not allowed.
String operations are not allowed.
You will read characters from the title string into stack or queue objects and do the required operation.
( Hint : Declare stack and queue structures defined in C++ STL )
Submission Notes:
Late assignments will NOT be graded.
Once finished, compress your code and upload it into your elearning account.
Your assignment must compile in order to be graded.
The CPP file should have your name, ID, Section, and a short description about the project
Comment should be written all over the program.
Cheating is not allowed (will be graded to 0).
Due Date: to be announced on e-learning system.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started