CS3340:  Intro OOP and Design

Project 2

Due Nov. 17, start of class

Address Book GUI Application with Database

 

Points 250

 


GOAL and Outcomes:

This project will serve you in developing your OOP skills through developing an Address Book GUI Application utilizing Database that requires

  • GUI INTERFACE: perform OOP design and coding by altering your project 1 code to now have a GUI interface as well as utilize database. You are to design the interface, but it is to have all the functionality of Project 1 and everything stipulated here.

  • IMPORTANT DATABASE ARCHITECTURE: we will NO LONGER be doing File Reading to get our AddressEntry objects. We will read them in from a database tabled called ADDRESSENTRYTABLE. Also, everytime a new AddressEntry object is created we will immediately store to this database table. Also, when an AddressEntry is removed we will immediately remove it from the databasetable.
    • DATABASE: You will use the database in the following ways:
      1. The Collection of AddressEntry objects in the AddressBook is initialized with the contents of a database table called ADDRESSENTRYTABLE which has fields representing the variables in the AddressEntry class. You must add to the ADDRESSENTRYTABLE a field called ID. You must change the AddressEntry class to contain the corresponding variable ID.
      2. Any time a new AddresEntry object is created it should be stored in the table
      3. Any time an existing AddressEntry object is modified it should be updated in the table


  • GIT: you are still to use the SAME git repository you create before. But, now you need to create a new version of the software. READ up on how to use Git "tag" to create a version. read https://git-scm.com/book/en/v2/Git-Basics-Tagging or search on internet. (e.g. git tag -a v1.4 -m 'gui version 2.0' ) . Decide if you want to create a new branch or not --I will ask you to tell me why? Again-YOU MUST comment well any commits you make --I will be looking at these.

 

  • UNIT TESTING: NOTE -we are not going to add any new unit testing for Project 2. Why? Well I am trying to save you some time and make this project easier and hoping that experiencing it in Project 1 is enough exposure for you to understand the basics

 

FINER Details

Create a GUI Application that implements an AddressApplication of project 1. The program should initialize as described in class (and as you are doing with exercise that supports this project) with loading from the database table ADDRESSENTRYTABLE.

The GUI must contain

  • Scrollable area/canvas - place to display the current list of AddressEntries (we will present some tips in class on this using JList)
  • IMPORTANT: read tips on one way to create scollable selectable lists using JList and JScrollPane here
  • New button - when hit button displays a dialog box for entering in all information for a new AddressEntry
  • what is stored in the AddressBook object should always be consistent, the same, as what is currently in the ADDRESSENTRYTABLE AND consistent to what is displayed as the current list of AddressEntries
  • Some GUI way to enter in a new AddressEntry, and also select it and update it (re-edit...this is a sequence of remove and add methods) --note any updating should result in immediate updating in database.
  • Some GUI way to select an AddressEntry from the listing
  • Some GUI to find via project 1 type code with last name, AddressEntry objects and display in SEPARATE scrollable area. THIS is done through search AddressEntry objects currently in "memory" of application. THIS IS NOT a database search. (note the memory objects should be consistent with database anyways)
  • Some GUI way to remove an AddressEntry object which removes it from AddressBook AND removes it from ADDRESSENTRYTABLE AND removes it from the list of AddressEntry objects being displayed in the GUI.
  • Some GUI way to exit the program.

 

FURTHER REQUIREMENTS:

  • Your should get rid of all code reading from a file, we are using a database now as discussed above!!!
  • Project 1 code modify: Create a class named Address that contains String instance variables for street, city, state, and zip code. This class should contain a constructor that accepts values to initialize these variables and methods that return each one. In addition, it should contain a method that returns a string for the Address object. Similarly the class Name should be constructed with variable, constructors and methods.
  • Project 1 code modify: Modify the AddressBookEntry so that it only contains as variables:
    • name (instance of new Name class)
    • address (instance of new Address class)
    • ID (most likely a string or int).
      • AddressEntry class now has class variables of:
        • name (instance of Name)
        • address (instance of Address)
        • email (String)
        • phone (String)
        • ID (String or int as you choose --makes sense with database)
      • Name class contains constructor to set class variables of:
        • firstName (String)
        • lastName (String)
      • Address class contains construcotrs (see above) to set class variables of:
        • street (String)
        • city (String)
        • state (String
        • zip (int)

       

  • Project 1 code modify: Code at least two constructors in the AddressBookEntry class…one that accepts a name and Address object with email and phone and ID and one that accepts a name, city, street, state, and zip code and email and phone and ID separately which will create the Name and Address instances stored as variables in the AddressEntry object you are creating.
  • Project 1 Code modify: Code methods that set and get the address. A programmer that uses this class should be able to set the address by either sending in an Address object or the string variables for street, city, state, and zip. Same setters/getters for the new Name class.

 

  • Some things to consider (there may be more...it is up to you to find them...this is part of the design)
    • Javadoc documents of all classes used in project 2 (including ones from project 1 still in Project 2).
    • Update UML class diagrams to include new classes in addition to those from project 1
  • Packaging: YOU must use packages as follows:

      • address = contains AddressBookApplciation class
      • address.gui = contains gui classes you create (if you have no classes, then no need for this package)
      • address.data = contains AddressEntry and any other data classes you created.
      • address.gui.event = contains any event listener classes you created (not it may be that you have annonymous inner classes for event handling and if this is the case for all event listeners you will not need this package)


Evaluation Guidelines



Fellow Student Evaluation ---NOT DOING FOR THIS PROJECT AS DISCUSSED/VOTED ON

  • You will be given up to 30 points for a thorough and complete evaluation of a fellow students work. You are assessed on how well you have done at evaluating a fellow student.
  • This will be done using the blackboard "ProjectX_Post_For_Fellow_Review" and "ProjectX Fellow Review" assignments. Read Instructions for Fellow Student Evaluation.
  • Your evaluation is important because it:
    • may be used as guidance by the Instructor in forming their evaluation
    • it is used by the student you are evaluating as a peer evaluation and feedback of how they did on this project.
  • This is the Fellow Student Evaluation questions you will use for evaluation
    • If the instructor requests an paper copy - Put your name and students name on top as:
      • STUDENT: the student's name
      • REVIEWER: your name
      • THEN give a numeric score for EACH line item AND MOST importantly add comments under each line item add the following items:
        • A. SYNOPSIS of LINE ITEM: synopsis in english of what the student did on line item. If it doesn't work, try to give fellow student tips as to why this might be.
        • B. CRITIQUE of LINE ITEM: tell student how well they did in English- think about understandability/readability, code reuse, good OOP standards as appropriate (encapsulation, inheritance, construction, appropriate methods, class variables), code efficiency. If item didn't work tell how much was implemented 10% or 50%, etc. and what was not done. If item did work tell how might improve.


Deliverables

  1. CodeWorks.doc: contains the following components:
    • A: Description- give a detailed description of how your system works including:
      • A.1) List of Classes: with brief desciption of purpose, discuss any data structures/algorithms used their efficiency in relation to the main operations of our menu - loading, addition, removal, find, listing, saving. Use O(n) terminonlogy where n is the number of entries.
      • A.2) State of System: a description of what parts are or are not working ---give details. If your system is NOT working and you do not show screenshots of how it is failing and show you have through screen shots tried to insert breakpoints and done debugging you will have points taken off.
    • B: URL: Posting of JavaDoc code to your server account. Turn in URL to website. Every class, its variables and methods MUST be documented/described --not just listed.
    • C: UML/Design: contains the following
      • C.1) UML Class Hierarchy Diagram: showing Hierarchy and Cardinality and Object Associations for this project.
    • D: Working Screenshots: screenshots showing your Java Application working (capture screen dumps into a word document) for the following cases:
      • D.1) Work Instance 1: Read in entries from database followed by listing. The database must contain a minimum of 5 addresses. Place screenshots of database table and output shown in GUI of program here.

      • D.2) Work Instance 2: immediately following D.1 do an addition of new AddressEntry object followed by a listing
        Show result in ADRESSBOOKENTRY database table.
        Place screenshots of UPDATED (has a new entry) database table AND output shown in GUI of program here.

      • D.3) Work Intsance 3: immediately folllowing D.2 do a removal of a entry followed by a listing
        Place screenshots of UPDATED (has removed an entry) ADDRESSBOOKENTRY database table AND output shown in GUI of program here.

      • D.4) Work Instance 4: immediately followin D.3 do a find using input that should retrieve at least one entry. Now do a find using input that should retrieve no entries.
        Place screenshots of each find here.





    • E: Screen shots showing the BitBucket account and your repository --show Commits, Show Code tree


  2. Demonstrate Project Create YouTUBE video and give link when turn into Blackboard project.
  3. Code.zip zip up entire Eclipse Project!!!!!
  4. Upload all files above to blackboard project. MUST KEEP THESE FILENAMES.

 

© Lynne Grewe