Write a simple tester program

Assignment Help JAVA Programming
Reference no: EM13784439

MailingAddress.java

Contact.java, Friend.java, BusinessAssociate.java

AdressBook.java, AddressBookTester.java

Then I have to have a MailingAddressTester

MailingAddressTester program to output? For example, run the program and enter the following values:

Enter the street address: 91 George Road

Enter the city: Raleigh

Enter the state: CA

Enter the zipcode: 12345

A BusinessAssociate class

IMPLEMENT THE FRIEND CLASS

Implement a class named Friend which extends the Contact class. The Friend class should have a field that represents the friend's birthday. For simplicity, the birthdate can be represented with a String. Provide one or more constructors and the appropriate mutator / accessor methods (getter and setter methods) for the friend's birthday. Override the toString method to convert a Friend object to a string of the following form:

full name, email, birthday

IMPLEMENT THE BUSINESSASSOCIATE CLASS

Implement a class named BusinessAssociate which inherits from the Contact class. The BusinessAssociate class should have a field that represents the company affiliation, a field to store the business associate's title (Mr., Mrs., Dr., etc.), and a field to store the associate's current position (Project Manager, Software Engineer, CEO, etc.). Provide one or more constructors and the appropriate mutator / accessor methods for the instance variables. The BusinessAssociate should override the getFullName()method to add the associate's title to the full name (for example, Dr. John Smith). Override the toString() method to convert a BusinessAssociate object to a string of the following form:

Complete the class AddressBook included in the labfiles10.zip file. The AddressBook class is used to keep track of multiple contacts. In the AddressBook class there should be a single instance variable to hold the list of contacts in the address book. You should implement the following methods in the AddressBook class:

Method

Description

public ArrayList<String> getEmailList()

Returns a list containing a

String for the email address for each of the contacts in

the contact list.

public ArrayList<String> getFriends()

Returns a list containing a String for each of the friends in the contact list. Each

friend should be converted to a String using the toString method of the Friend class.

public String toString()

Override the toString method to return a string representing all the contacts in the AddresBook. Each contact should be appended to the string using the toString method defined for that contact.

Write a simple tester program called AddressBookTester that does the following:

• Creates an address book

• Adds the following contacts:

o Friend: John Smith, *****@******.***, 01/14/80

o Friend: Joe Adams, *****@******.***, 07/10/82

o Business Associate: Mrs. Sue Johnson, *****@******.***, Acme Inc., Sales

• Displays all contacts in the address book (use the toString method of the AddressBook).

• Displays the list of all email addresses separated by commas. The list of comma separated emails should be preceded by the heading Email List.

• Displays a list of all the friends in the address book. The list of comma separated friends should be preceded by the heading Friends List.

• Program output should look like this:

Reference no: EM13784439

Questions Cloud

Numerical example of a basic-key financial ratio : Provide a numerical example of a basic/key financial ratio and explain its organizational implications!
The return on assets effect quantifies and measures : Evidence of the growth and influence of supply management in an organization includes: The return on assets effect (ROA) quantifies and measures:
Why is it important to buy insurance policies : Why is it important to buy insurance policies? Give a detailed analysis of the importance of buying insurance policies clearly highlighting the benefits of taking insurance for various functions such as medication, social services, and automobiles..
Scientific method properly employed in this study : Select an empirical research article from a volume of Organizational Research Methods (some years have the full text available in the library, others do not. Make sure you choose a full-text option article). Briefly describe the article. Address t..
Write a simple tester program : Implement a class named Friend which extends the Contact class. The Friend class should have a field that represents the friend's birthday. For simplicity, the birthdate can be represented with a String.
Discuss contractual clauses that you would offer retailers : Suppose you are the main negotiator between your company and retailers carrying your company's line of dairy products. Your company is attempting to introduce a new brand of Greek yogurt, and it is your responsibility to negotiate agreement between y..
Write a discussing ethical differences due to culture lead : Write a 500-700 word discussing whether or not the ethical differences due to culture could or should lead to attempts to reform business practices, working conditions
Several conceptual models to represent relationships : Draw several conceptual models to represent relationships that could be tested with the survey. Be sure to include comparisons of the Santa Fe Grill and Jose’s Southwestern Cafe.
Assignment on foundations of a compensation strategy : Foundations of a Compensation Strategy.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd