Objective: To practice developing program logic To practice creating and using a linked data structure To design and implement multiple classesThe Problem:In this assignment, you will use arrays and linked lists to implement a simple version of Facebook. Your program will read a sequence of commands to create people, record that two people are friends, etc. These commands will be read from an input file and processed one at a time. All output will be placed in the console.Specifications:Your project (project4) should contain all classes, including exception classes (i.e. you will not need to link to other projects and include import statements.) The application class will be responsible for reading and processing the commands stored in the data file (commands.txt). Each is explained below. P F U L Q V X Terminate the program.For example:Input OutputP Sue 1P John 0P Ellen 0P Mike 0John is friends with:Ellen is friends with:Mike is friends with:F John SueF Ellen SueF Mike SueF Mike JohnJohn is friends with: Mike Sue2Ellen is friends with: SueMike is friends with: JohnU Sue JohnJohn is friends with: MikeEllen is friends with: SueMike is friends with: John SueQ Ellen Mike Ellen and Mike are not friendsQ Ellen Sue Ellen and Sue are friendsV Sue Sue is friends with: Mike Ellen andMike is friends with: John Sue andEllen is friends with: SueV Mike Mike is friends with: John SueXInput File:An input file will be provided at a later date which will allow you to further test your program. For now, you should create a test file and include some simple commands. You can add commands to this file as you create/write additional methods to process these new commands. The following guidelines will apply. You can assume that the data file is correctly formatted and will adhere to the formatting guidelines outlined previously. A FriendNotFoundException will be thrown if a name mentioned in an F, U, L, Q or V command is not found. The sequence of commands ends with X. If a person friends or unfriends himself, the program should do nothing; it should not add the person to his own list of friends. If a person unfriends someone who is not a friend, the program should do nothing.UML Class Diagrams:The classes that need to be developed are outlined below.3Notes: The FriendList class contains a linked list. The design of the linked list is different than the approach that we have taken in class/lab. You should design this class with header and trailer sentinels (see page 127 of our textbook on Header and Trailer Sentinels). The design simplifies coding by eliminating the special case of having to modify the reference to the first node when inserting/removing the first node. The Node class and the FriendList class should not be developed using generics.The Application Class:The application class is responsible for reading and processing the commands.Output:For each command processed you should display information about the command and provide output that clearly shows the effect of the command. All output should be displayed in the console and should be properly labeled.
Programming
[Solved] SOLVED:Programming Project #4 Solution
$25
File Name: SOLVED:Programming_Project_#4_Solution.zip
File Size: 357.96 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.