Assignment 7 – Checking Passwords (version 2)

Maximum Points = 50

 The purpose of this lab is to continue your study of computer programming and algorithms using the Java programming language. In this lab you will use several new Java features including – ArrayLists and while loops.

 

Write a program that reads user records from a file and stores them in a list. From the command line, ask the user for the username and password and provide an appropriate response, welcoming the user by name if the username and password are both correct.

 

Your program must have these features:

 

  1. A method that receives the name of a text file (I will use a file named.password.txt) consisting of user records: username, password, and actual name of the account owner e.g.

Wayne,1234,Wayne Summers

Sue,password,Susan Smith

 

  1. Store the user data from the file into an ArrayList of Users (username, password, and actual name of the account owner) where the User class has complete gets/sets/ and toString methods
  2. Interactively ask the user for a username and password, compare with the usernames and passwords in the list and print an appropriate message. You may use assume the usernames are unique and that the usernames are NOT cases sensitive (i.e SUE=sue)..
  3. Allow the program to run, asking for username & password until the user tells your program to stop.

 

You may use either command line, Applet, a GUI.

 

Make sure that your program uses proper indentation and complete documentation. See http://csc.columbusstate.edu/summers/NOTES/1301/style.htm for guidelines.

The program heading should occur at the top of the program and should include:

               #============================
               # PROGRAM SPECIFICATIONS
               # NARRATIVE DESCRIPTION:
                #
                #  @author (your name) 
               #  @version(date)
               #==============================

  (Due before 8 a.m. on Monday, April 9, 2012) Submit a .doc file containing the UML class diagrams (including the “main” class) showing inheritance for all the classes used in your program and your timesheet documenting your time so far to the dropbox in WebCT. [10 pts]

(Due before 8 a.m. on Monday, April 16, 2012, accepted until 8 a.m. on Wednesday, April 18, 2012) Submit your .java files containing your program and your timesheet documenting your time to the dropbox in WebCT.

 Grades are determined using the following scale:

  Header..………………….:___/2

  Data members……..……:___/4

  Methods..………………..:___/4

 

  • Runs correctly..…………………:___/10
  • Correct output……..……………:___/10
  • Design of output..………………:___/8
  • Design of logic…………………:___/10
  • Standards……………………….:___/7
  • Documentation.………………...:___/5

 

Grading Rubric  (Word document)