LoginMenu.java - package app*LoginMenu holds method main Will create Person's to be added to the hashtable based on user registering accounts Can also

LoginMenu.java - package app*LoginMenu holds method main...

This preview shows page 1 - 2 out of 5 pages.

package app; /**LoginMenu holds method main. Will create Person's to be added to the hashtable based on user registering accounts * Can also login to pre made accounts * Will call displayUserProfile in Person.java once profile has been created or logged in to. * Loops continously based on user's choice * * @author Isaac Kim * @author Marley Willyoung * @author Matthew Davenport * @author Victoria Nguyen * @author Jahnae Reese * */ import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; import java.io.FileReader; import java.util.Random; public class LoginMenu { public static void main(String[] args) throws IOException{ @SuppressWarnings("rawtypes") //creates a hashtable to store Person Objects. Person Objects will have a Linked Lists of strings that hold a friends list //Friends list will access those friends based on the key asssociated with the friend's username by going into the hashtable HashClass<Integer, Person> hashtable = new HashClass<Integer, Person>(1000); //Create 5 test accounts to test functionality of the program Person<Object> testPerson1 = new Person<Object>("qwertyui", "John", "Tavner", "I like to fish", "a", "ONLINE"); Person<Object> testPerson2 = new Person<Object>("qwertyiu", "Cristiano", "Ronaldo", "I like soccer.", "a", "BUSY"); Person<Object> testPerson3 = new Person<Object>("poiuytre", "Thanos", "DidNothingWrong", "Perfectly balanced like as things should be", "b", "OFFLINE"); Person<Object> testPerson4 = new Person<Object>("pepepepe", "iron", "man", "I like potts.", "steel", "ONLINE"); Person<Object> testPerson5 = new Person<Object>("lkjhgfds", "Darth", "Vader", "Come to the dark side", "c", "BUSY"); //create 5 keys based on usernames of the test accounts int person1ID = HashClass.createKey(testPerson1.getUserName()); int person2ID = HashClass.createKey(testPerson2.getUserName()); int person3ID = HashClass.createKey(testPerson3.getUserName()); int person4ID = HashClass.createKey(testPerson4.getUserName());
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 5 pages?

  • Spring '15
  • Delia Garbacea
  • Login, Busy, Victoria Nguyen, Jahnae Reese, Marley Willyoung

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture