Docsity

Java Project 2: My Contacts Application Development - Prof. Orlena C. Gotel, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
Page 1 of 3
CS121/IS223: Java Project 2 – My Contacts (version 1)
Dr Olly Gotel [email protected]; http://csis.pace.edu/~ogotel
Due date: 5-MAY-09
READ THESE INSTRUCTIONS VERY CAREFULLY
I AM HAPPY FOR YOU TO DO THIS PROJECT INDIVIDUALLY BUT I WOULD PREFER YOU DO THIS IN
PAIRS. PAIRING UP GIVES YOU THE GREAT BENEFIT OF DISCUSSING THE WORK AND
BRAINSTORMING TOGETHER, AND THIS MAY HELP MANY OF YOU. NOTE THAT IF YOU DO PAIR
UP, I WILL ASK EACH STUDENT INDIVIDUALLY TO EXPLAIN THE WORK TO ME DURING AN ORAL
MEETING AND YOU WILL GET THE SAME GRADE IF I AM CONFIDENT THAT YOU HAVE WORKED
AS A TEAM.
Overview
You are going to develop a Java application to store names, telephone numbers, addresses and other useful
information about your buddies and contacts. Your application is to provide all the kinds of functionality you would
expect from something like a cell phone address book that enables you to store and find information. It could be
used to provide a short cut for dialing numbers and also to look-up names using caller-ID on incoming calls. Think
of this as a simple address book or contact list (whatever you prefer to name it).
NOTE: this is an open-ended question and there is no single right answer. Points will be awarded for clarity,
completeness and correctness. The better and more thoroughly you model contact information and the more
comprehensive the functions you offer, the better your grade will be.
You will learn later in your studies that there is actually a Java Software Development Kit for mobile devices. “Java
Platform, Micro Edition (Java ME) provides a robust, flexible environment for applications running on mobile and
other embedded devices—mobile phones, personal digital assistants (PDAs), TV set-top boxes, and printers.” Cool!
You could implement this for real on your phone…maybe later.
IMPORTANT – THIS IS AN OPEN-ENDED PROJECT AND I EXPECT YOU TO TAKE
IT TO WHERE YOU ARE ABLE! NO TWO PROJECTS SHOULD BE THE SAME FOR
THIS VERY REASON!!!
pf3

Partial preview of the text

Download Java Project 2: My Contacts Application Development - Prof. Orlena C. Gotel and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

CS121/IS223: Java Project 2 – My Contacts (version 1)

Dr Olly Gotel [email protected]; http://csis.pace.edu/~ogotel

Due date: 5 - MAY- 09

READ THESE INSTRUCTIONS VERY CAREFULLY

I AM HAPPY FOR YOU TO DO THIS PROJECT INDIVIDUALLY BUT I WOULD PREFER YOU DO THIS IN

PAIRS. PAIRING UP GIVES YOU THE GREAT BENEFIT OF DISCUSSING THE WORK AND

BRAINSTORMING TOGETHER, AND THIS MAY HELP MANY OF YOU. NOTE THAT IF YOU DO PAIR

UP, I WILL ASK EACH STUDENT INDIVIDUALLY TO EXPLAIN THE WORK TO ME DURING AN ORAL

MEETING AND YOU WILL GET THE SAME GRADE IF I AM CONFIDENT THAT YOU HAVE WORKED

AS A TEAM.

Overview

You are going to develop a Java application to store names, telephone numbers, addresses and other useful information about your buddies and contacts. Your application is to provide all the kinds of functionality you would expect from something like a cell phone address book that enables you to store and find information. It could be used to provide a short cut for dialing numbers and also to look-up names using caller-ID on incoming calls. Think of this as a simple address book or contact list (whatever you prefer to name it). NOTE: this is an open-ended question and there is no single right answer. Points will be awarded for clarity, completeness and correctness. The better and more thoroughly you model contact information and the more comprehensive the functions you offer, the better your grade will be. You will learn later in your studies that there is actually a Java Software Development Kit for mobile devices. “Java Platform, Micro Edition (Java ME) provides a robust, flexible environment for applications running on mobile and other embedded devices—mobile phones, personal digital assistants (PDAs), TV set-top boxes, and printers.” Cool! You could implement this for real on your phone…maybe later.

IMPORTANT – THIS IS AN OPEN-ENDED PROJECT AND I EXPECT YOU TO TAKE

IT TO WHERE YOU ARE ABLE! NO TWO PROJECTS SHOULD BE THE SAME FOR

THIS VERY REASON!!!

This project is a test of your analytical and design skills, as much as your Java skills, so think carefully about designing “good” abstractions for the things you are modeling. High quality object-oriented design is what is important here, so remember the important principles. Document and describe your classes, instance variables and associated methods using UML class diagrams and/or CRC cards. Check that instances of your classes will be able to work together to provide the functionality that you require. You should run through some scenarios to help you check for this. Only attempt to write your code when you are happy that your design will work; I would prefer you to design and implement a small and functioning OO application rather than rushing in and writing spaghetti code.

Instructions

PART A - Create a class that models a ContactEntry You should consider all the “meta” data associated with an entry in a cell phone and use this data to determine the instance variables. “Meta” data is the fields you want to represent, so: name, address, company, job title, phone number, mobile number, email, photo, URL, IM address (for instance). Also consider the sort of operations a ContactEntry object may need to be able to carry out, and use this knowledge to determine suitable methods. Think about all the features you might end up wanting in a cell phone application and therefore model the data and methods you think you will need. For example: you may need getters and setters to give the instance variables values, to update and change them, and to retrieve them. Think also about a toString method to return all the details of the contact. Use the images I provided to guide you, but I would prefer you use your own imagination. PART B - Create a class that models a ContactList Consider using an array or an ArrayList to store the collection of ContactEntry. What instance variables and methods would be useful for managing such a collection? Do you know how many entries are in there? Determine, design and implement as many useful services that you can think of as methods. This is up to you, but I would expect some basic functionality like add, delete, lookup by name, lookup by number, iterate through the collection, etc. PART C - Create a driver class for this application. Call this MyContactListDemo – it has the main method This should clearly demonstrate the all the workings of the above classes. It will make an empty ContactList and start making new ContactEntry (and the user will need to input the required values of course). It should be menu driven with a loop to allow the user to explore all the capabilities of your application. You may like to use Serialization to store a copy of the ContactList to disk so that the contact list is not lost between runs of the program.