Hello,
I need to perform the following using stacks and queues. I would appreciate any help. thanks.
1. Create a file that holds first and last name. (lets say sta minch).
2. read the file.
3. creat a stack names s_name.
4. push all characters from first name into stack s_name.
5. create a queue named q_name.
6. Place all characters from last name into q_name.
7. Create 2 sets names set1_name and set2_name.
8. Take all charactets out of s_name, print them as a string, and insert them into the set set1_name.
9. Take all charactets out of q_name, print them as a string, and insert them into the set set2_name.
10. create the union, intersection, and difference of 2 sets, set1_name and set2_name, and print results as strings of characters.
I need to perform the following using stacks and queues. I would appreciate any help. thanks.
1. Create a file that holds first and last name. (lets say sta minch).
2. read the file.
3. creat a stack names s_name.
4. push all characters from first name into stack s_name.
5. create a queue named q_name.
6. Place all characters from last name into q_name.
7. Create 2 sets names set1_name and set2_name.
8. Take all charactets out of s_name, print them as a string, and insert them into the set set1_name.
9. Take all charactets out of q_name, print them as a string, and insert them into the set set2_name.
10. create the union, intersection, and difference of 2 sets, set1_name and set2_name, and print results as strings of characters.