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

  Overview in this assignment you are provided with an

overview in this assignment you are provided with an interface that contains a generic type.you are asked to create two

  The bookstore wants you to make an object-oriented model

student bookstore at pleasant creek community college situation the bookstore staff at pleasant creek community college

  Earn a fixed salary

Write a JavaTM application using NetBeansTM Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:A salesperson will earn a fixed salary of .

  Create a complete java application

Create a complete Java application that meets these requirements and the program has an opening comments section (using block comments) with the file name, date, your name, and purpose of the program.

  Java program using jgrasp and the software development kit

Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format:

  Create a user interface for a library application

Create a user interface for a library application that allows the user (i.e., the Librarian) to enter Book objects.

  How to read data in a link list

How to read data in a link list?

  Read the article titled teaching software componentization

read the article titled teaching software componentization a bar chart java bean.write a page paper in which

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Write a program that uses a dynamic list of strings

Write a program that uses a dynamic list of strings to keep track of a list of chores that you have to accomplish today.

  Program that uses a library database of books

Write a Java program that uses a library database of books and patron data, as described in Exercise R22.2. Patrons should be able to check out and return books.

  Write an if statement that uses the flag as the condition

Write an if statement that uses the flag as the condition. Remember that the flag is a Boolean variable, therefore is true or false. It does not have to be compared to anything.

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