Examlex

Solved

The Class Name Consists of 4 Instance Data, String Title

question 1

Essay

The class Name consists of 4 instance data, String title, String first, String middle, String last. The class has a constructor that is passed all 4 String values and initializes the class appropriately, and has 4 methods, each returns one of the four instance data, called returnTitle( ), returnFirst( ), returnMiddle( ) and returnLast( ). Name[ ] addressBook = new Name[100]; is performed. Write a method that is passed 4 String parameters corresponding to a Name's title, first, middle, and last, and finds this Name in addressBook and returns the index of where this Name was found, or -1 if the Name was not found. Assume that addressBook stores n entries (n is an int).


Definitions:

Surface Runoff

Water from rain, snowmelt, or other sources that flows over the land's surface and is not absorbed into the ground.

Groundwater

Water held underground in the soil or in pores and crevices in rock.

Accounts Receivable

Funds that are due to a company from its customers for products or services that have been provided but remain unpaid.

Sales Revenue

The total income received by a company from its sales of goods or services, before any expenses are subtracted.

Related Questions