Question: C++ work, not Java. Thank you. Hello! i need help with this program. Need's a stack class that... push's pop's isEmpty makeEmpty peek print. With
C++ work, not Java. Thank you.
Hello!
i need help with this program.
Need's a stack class that...
push's
pop's
isEmpty
makeEmpty
peek
print.
With my stack class, i'm going to #include it in my Facebook class, which should do this...
addFriend(): add's them since they are a stack object. meaning I use the push function in the stack class
removeFriend(): remove's them with the pop function, removing them from the list.
printFriends(): this simply enables the print() function from the stack
latestFriend(): we should use the peek() fuction, printing out the latest video
resetFriends(): I believe this will do the makeEmpthy() function to empty out the friends list
checkList(): and for this we use the isEmpty() function from the stack class
These Data members can be in there too I believe "DataTyperUser" who is going to be friended
"Stack
"int numOfFriends" this will track all of the friends we have Main Program
This will #include the Facebook class, and read president's and their home states, I have them listed like this in a text file"
George Washington VA John Adams MA Thomas Jefferson VA
etc. goes all the way down to....
Barack Obama IL Donald John Trump NY
All I need to know is where to put this file name in the main program, please comment where I can put that file.
With the president and homestates, the Facebook Class options should be able to this AddFriend, should push them all into a FriendList. We want all presidents to be our friend
LatestFriend, this will print out the recent president and homestate
Donald John Trump NY
that sohuld come up.
All these abilities in the facebook class should work on presidents. (like ResetFriends, PrintFriends) etc, but for presidents! i appreciate any help I can get. thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
