My program for school requires me to output information as such...

Name: Steve
Address: 123 Main
Phone# 555-5555
Social SecuritY# 555-555-555
Current Hours: 0.0

Name: Mary
Address: 13 Manor
Phone# 555-5555
Social SecuritY# 555-555-555
Paid:846.15

Name: Gwen
Address: 1 Birch
Phone# 555-5555
Social SecuritY# 555-555-555
Current Hours: 2.0
Paid: 17.1

I made my superclass and the 3 subclasses for each employee, but this part I have no idea how to do.

Create a class named Staff according to the following points:

-Declare an array type variable of super class type (StaffMember)

-Develop a constructor in which array of 3 StaffMembers are allocated.

-Create an object of class Hourly with suitable values and assign it
to first element of array

-Create an object of class Employee with suitable values and assign it to
2nd element of array.

-Create an object of class Hourly with suitable values and assign it to
3rd element of array

-Include a method called payday() which has a local variable “amount
of type double

-This method has a for loop which goes until length of array is reached

-Within loop, method pay() is called polymorphically with reference to
array element index (super class reference) and value of pay() is assigned
to variable “amount.

-If amount = 0 display “Thanks otherwise display amount such as “Paid:
+ amount;

What code have you written so far? Go ahead and post it, and maybe others can help. Even further, if you've even attempted to do any of the things you're asking about, post that, and others will probably help out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.