Class Actor

java.lang.Object
  |
  +--Actor

public class Actor
extends java.lang.Object

Simple Actor class. Represents an actor that needs to get paid


Field Summary
private  java.lang.String myName
          The name of the actor
private  int nPerformances
          The number of perfomances worked
private static double PAYRATE
          The basic rate per perfomance.
 
Constructor Summary
Actor(java.lang.String name)
          Constructor for actor class
 
Method Summary
 double calculatePay()
          Calculates and returns the weekly pay for the actor
 void perform(int n)
          Sets the number of performances for the week
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

PAYRATE

private static final double PAYRATE
The basic rate per perfomance. Common for all actors

myName

private java.lang.String myName
The name of the actor

nPerformances

private int nPerformances
The number of perfomances worked
Constructor Detail

Actor

public Actor(java.lang.String name)
Constructor for actor class
Parameters:
name - The actor's name
Method Detail

calculatePay

public double calculatePay()
Calculates and returns the weekly pay for the actor

perform

public void perform(int n)
Sets the number of performances for the week
Parameters:
n - number of performances played during the week