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

  Calculate the percentage wins of a team

Write a program that will calculate the percentage wins of a team. The program will input the number of wins and losses that a team acquired during a season. The wins should be input in a parameter-less value returning function that returns the wi..

  Definition of a method named copy receives

Write the definition of a method named copy receives a reference to a Scanner object associated with a stream of input. The method reads all the Strings remaining to be read from the stream and displays them

  Allow the user to display a work history report

The 'report screen' shall:Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.

  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

  Write a program in java that reads contents of two vectors

Write a program in Java that reads contents of two vectors, and then displays the sum of these two vectors. The program should prompt the user to enter the size of the vectors first.

  Write jvm program which accepts rpn expression

Write down the IJVM program which accepts RPN expression, with each operand and operator entered line by line. As each number (operand) is entered, push it on stack.

  Create a secure parts inventory catalog system

You will create a secure Parts Inventory Catalog system using Model 2 architecture. The application will require a user to have the proper access right to enter the system, and when satisfied, presents the catalog of items currently available in t..

  Write a recursive method called maxsum

write a recrusive method called maxSum that accepts a list of integers. L, and an integer limit n as parameters and use backtracking to find the maximum sum that can be generated by adding elements of L that do not exceed n.

  Construct a bulls and cows program for my intro java class

construct a Bulls and Cows program for my intro Java class. This program needs to perform the basic functions of the game (determining how many cows there are and how many bulls there are and tell the player when they win), but it also needs to offer..

  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:

  Compare and contrast the safavid and ottoman empires

How did the creation of the Janissary system shape the development of the Ottoman Empire? What precipitated the decline of the Ottoman Empire? Compare and contrast the Safavid and Ottoman empires?

  Develop a java program

Develop a Java program which, given the width, length and depth (in metres), of a swimming pool, determines and outputs.

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