CS304 VU Current Assignment No5 FAll 2011 Last date 26 Jan 2012 check written updates
Object Oriented Programming (CS304)
Assignment No.05
Deadline
Your assignment must be uploaded before or on 26th January, 2012.
Objectives
This assignment has been designed so that you would be able toimplement the Electronic Cardsystem in OOP. After the completion of this assignment you should have a good grasp on how to implement.
> Integrate different classes
> Template classes
> Inheritance and Templates
> Template functions
> Template Constructor
In previous assignments we have understood all the basics of theElectronic Card System including the Object Model Diagram and highlighted the Abstraction ofclasses in terms of attributes and functions prototype. Implement of User and Card related functions ofElectronic Card System. Now we want:
1. Now we want to integrate both the User and Card implementation, and write the main function for the entire Electronic Card System.
2. Make Cards and User Class as a template Class, Inherit differentclasses form them.
Assignment:
1st Part of the assignment:
In first part of the assignment, integrate the User class and Cardclass code (3rd and 4th assignmentsolution) in a single file. And write the main function for them. Such as:
For User:
In the main function you will create object of “User” class, and through that particular object you will call add, view, and delete method of user class.
Create an object of “Card” class, and through the particular object you will call add, view, and delete method for “Card” class.
When you call the add method of User class, then the following options will appear:
Please select any option:
1. Member User
2. Admin User
If user select 1 option, then the following output will be required:
Enter User Id:
Enter User Name:
Enter User Password:
Similar functionality for the Admin User
If the view method is called through User class object, then the following output will appear:
User Id:
User Name:
Status:
If the delete method is called through User class object, then the following output will appear:
Enter user Id:
This user has been deleted successfully
For Cards:
In main function, create an object of Cards class, and through that object call different functions of Cardsclass, such as AddCards, ViewCards, and DeleteCards.
If the user calls the AddCards method, then the following will appears:
Please select any one option:
1. Birth Cards
2. Marriage Cards
3. Friendship Cards
4. Baraat Cards
5. Walima Cards
6. Mehindi Cards
When user select any one option form the above, then the following will appears:
Enter Card Id:
Enter Card Name:
Enter Message for the receiver:
If the user calls the ViewCards method, then the following will appears:
Enter Card Id:
CardId :__( card id will be show here) _ CardName_(Card Name will be shown here)___
Message for the receiver:________( Here will be the message for the receiver) ______
__________________________________________________ __________________________________________________ ____________________________________________
If the user calls the DeleteCards method, then the following will appears:
Enter Card Id:
This Card has been deleted successfully
Note:
Please include the code of 3rd and 4th assignment with the 5th assignment.
For this assignment consider “Cards” class as a concrete class, not an abstract class
2nd part of the assignment:
In the second part of the assignment, we declared templateclasses, template functions, template constructor, and inheritance in the case of template.
Make Users, Member Users, Admin Members, Cards, BirthCards, MarriageCards, Friendship Cards, as a template classes.
Declared template constructors for all the above classes.
Show the inheritance relationship between the above templateclasses.
Make add, view, and delete functions as a template functions.
Note: just write the declaration of template class, template functions, template constructors, and just write that how inheritance relationship is represented in the case of templates between the givenclasses.
Uploading Instructions:
You have to upload your running zipped Dev c++ project.
Idea Solution:
simply create to classes…admin, user
in admin class print three strings for input (mentioned in assignment)
1. else-if statement to access the forum user
2. else-if to store as well as create the card
3. do-while to repeate the procedure.
in user class print three strings for input
1. else-if to view card
2. do-while for repeatition…..
Assignment No.05
Deadline
Your assignment must be uploaded before or on 26th January, 2012.
Objectives
This assignment has been designed so that you would be able toimplement the Electronic Cardsystem in OOP. After the completion of this assignment you should have a good grasp on how to implement.
> Integrate different classes
> Template classes
> Inheritance and Templates
> Template functions
> Template Constructor
In previous assignments we have understood all the basics of theElectronic Card System including the Object Model Diagram and highlighted the Abstraction ofclasses in terms of attributes and functions prototype. Implement of User and Card related functions ofElectronic Card System. Now we want:
1. Now we want to integrate both the User and Card implementation, and write the main function for the entire Electronic Card System.
2. Make Cards and User Class as a template Class, Inherit differentclasses form them.
Assignment:
1st Part of the assignment:
In first part of the assignment, integrate the User class and Cardclass code (3rd and 4th assignmentsolution) in a single file. And write the main function for them. Such as:
For User:
In the main function you will create object of “User” class, and through that particular object you will call add, view, and delete method of user class.
Create an object of “Card” class, and through the particular object you will call add, view, and delete method for “Card” class.
When you call the add method of User class, then the following options will appear:
Please select any option:
1. Member User
2. Admin User
If user select 1 option, then the following output will be required:
Enter User Id:
Enter User Name:
Enter User Password:
Similar functionality for the Admin User
If the view method is called through User class object, then the following output will appear:
User Id:
User Name:
Status:
If the delete method is called through User class object, then the following output will appear:
Enter user Id:
This user has been deleted successfully
For Cards:
In main function, create an object of Cards class, and through that object call different functions of Cardsclass, such as AddCards, ViewCards, and DeleteCards.
If the user calls the AddCards method, then the following will appears:
Please select any one option:
1. Birth Cards
2. Marriage Cards
3. Friendship Cards
4. Baraat Cards
5. Walima Cards
6. Mehindi Cards
When user select any one option form the above, then the following will appears:
Enter Card Id:
Enter Card Name:
Enter Message for the receiver:
If the user calls the ViewCards method, then the following will appears:
Enter Card Id:
CardId :__( card id will be show here) _ CardName_(Card Name will be shown here)___
Message for the receiver:________( Here will be the message for the receiver) ______
__________________________________________________ __________________________________________________ ____________________________________________
If the user calls the DeleteCards method, then the following will appears:
Enter Card Id:
This Card has been deleted successfully
Note:
Please include the code of 3rd and 4th assignment with the 5th assignment.
For this assignment consider “Cards” class as a concrete class, not an abstract class
2nd part of the assignment:
In the second part of the assignment, we declared templateclasses, template functions, template constructor, and inheritance in the case of template.
Make Users, Member Users, Admin Members, Cards, BirthCards, MarriageCards, Friendship Cards, as a template classes.
Declared template constructors for all the above classes.
Show the inheritance relationship between the above templateclasses.
Make add, view, and delete functions as a template functions.
Note: just write the declaration of template class, template functions, template constructors, and just write that how inheritance relationship is represented in the case of templates between the givenclasses.
Uploading Instructions:
You have to upload your running zipped Dev c++ project.
Idea Solution:
simply create to classes…admin, user
in admin class print three strings for input (mentioned in assignment)
1. else-if statement to access the forum user
2. else-if to store as well as create the card
3. do-while to repeate the procedure.
in user class print three strings for input
1. else-if to view card
2. do-while for repeatition…..
0 comments:
Post a Comment