Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine you are a junior programmer and placed on an application development team with 10 other programmers. Your assignment is to create test classes and

Imagine you are a junior programmer and placed on an application development team with 10 other programmers. Your assignment is to create test classes and interfaces. Since all the programmers will be working somewhat independently on the team the project leader sees a need for interfaces to be developed to standardize certain constant identifiers and method signatures that potentially will be used in different classes written by different programmers on the team. The project lead has given you the job of writing and testing some of these interfaces and classes. Because you are new the project lead has given you a due date about 6 days hence. Below are the specifications the project leader provided to you. If you have any questions about the specifications the leader says not to hesitate to email. The leader specifically asks that all code meet the Java community standards for identifiers: all caps for constants; first capital letter for classes; camelCaseNotation for methods and variable identifiers.

 

The String constants' names and values:

FOOTBALL = "Football is the best sport"

BASEBALL = "Baseball is the best sport"

SOCCER = "Soccer is the best sport"

 

Abstract method signatures and description: 

void add(Object  x)  - used to add objects to a collection

void delete(Object  x) - used to remove object from a collection

void print(Object  x) - used to print the content of the parameterized object

void print() - used to print the content of an object of a class

 

The project leader tells you to test the interfaces by creating a very simple Players class, Teams class, and Equipment class. The Player object will contain a player's first name, a player's last name, a player's height, and a player's weight. A Team object will contain a team name, a type of team sport, a list of Players, and a list of Equipment. The Equipment object will contain an equipment name and sport name (football, baseball, soccer). Once these classes are defined you will be able to populate the test classes with test objects to test the interfaces. Use the test data as illustrated in the example output. How you populate the classes the project leader leaves up to you.

Once you complete the above specifications, you are in a position to make a driver class that contains a main method that will test the code. The output from the test will demonstrate that all the components work properly. Test with at least three Players objects, with at least 9 Equipment objects, and at least 3 Teams objects. See example test output provided by the project team.

Step by Step Solution

3.30 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

First lets create the interfaces for the constant identifiers and method signatures public interface Constants String FOOTBALL Football is the best sp... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Programming questions

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago

Question

What are the functions of top management?

Answered: 1 week ago

Question

Bring out the limitations of planning.

Answered: 1 week ago

Question

Discuss the differences between triggers and stored procedures.

Answered: 1 week ago