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

  Common to perform loops that vary the loop control

When an application contains an array and you want to use every element of the array in some task, it is common to perform loops that vary the loop control variable from 0 to one less than the size of the array.

  Write a piece of code that prints the values

Write a piece of code that prints the values requested in each part, given these variables:

  Design a boolean function named isprime,

A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Des..

  Java socket hello i need to this assignment done in net

hello i need to this assignment done in net beans . and i want comment in code .also screen shots of running program

  Programming sorting algorithms

Describe an approach to modifying the Sorts.java program so that after calling a sorting method the program prints out the number of swaps needed by the sorting method.

  Prepare demo program that implements all of above method

Specify, design, and implement a class that can be used in a program that simulates a combination lock.

  Write down java console application to add new student

Write down java console application presents the following menu. Add new student and scores in Biology, Physics and chemistry Search for a given student.

  Design and implement a set of classes and interfaces and

design and implement a set of classes and interfaces and use them to evaluate the rtas resource requirements.nbspyour

  Write a java program called calctickets

write a java program called CalcTickets that prompts (asks) the user to enter a ticket number. The format of a valid ticket is C[C]DDDDD[C][C]

  Prepare a main method that tests all of your functions

A method that outputs the name and list of all patients - A method that resets the number of patients to 0 and the patientList to an empty list - Prepare a main method that tests (i.e, unit testing) all of your functions.

  Implement a single threaded game engine

Implement a single threaded game engine and single player user interface for a casino style dice game. The rules are simple, the player places a bet and then rolls two dice before the house rolls against the player

  Write java program to compute how much federal need to pay

Write a java application to calculate how much federal and state tax you need to pay. The program should accomplish the following task.

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