A talent agency program , JAVA Programming

class Writer extends Client
{
   // additional members
   private boolean technical = false;
   private boolean government = false;
   private boolean international = false;
   private String rank;
   
   public Writer()
   {
      super();
      technical = false;
      government = false;
      international = false;
      rank = "undefined";
   }
  
   public Writer(String str_name, long annualIncome, double cut,
         boolean tech, boolean gov, boolean inter, String rnk)
   {
      super(str_name, annualIncome, cut);
    
      if (tech)
         technical = true;
      if (gov)
         government = true;
      if (inter)
         international = true;
      if (!SetRank(rnk))
         rank = "undefined";
   }
  
   public boolean SetWriter(String str_name, long annualIncome, double cut,
         boolean tech, boolean gov, boolean inter, String rnk)
   {
      if (!SetClient(str_name, annualIncome, cut))
         return false;
      if (!tech)
         return false;
      if (!gov)
         return false;
      if (!inter)
         return false;
      if (!SetRank(rnk))
         return false;
     
      return true;
   }
  
   String GetRank() { return rank; }
  
   public boolean SetRank(String rnk)
   {
      if (rnk != "staff writer" && rnk != "story editor"
            && rnk != "co-producer" && rnk != "producer"
            && rnk != "co-executive producer" && rnk != "executive producer")
         return false;
      rank = rnk;
      return true;
   }
  
   public String ToShow()
   {
      String output = "\nBackground in:" + "\n technology:\t\t" + technical
            + "\n government/politics:\t" + government
            + "\n travel experience:\t" + international + "\n rank\t\t\t" + rank;
      return output;
   }
  
   public void Display()
   {
     
      System.out.println(super.ToShow() + " " + ToShow());
   }
}

Posted Date: 2/19/2013 5:56:39 AM | Location : United States







Related Discussions:- A talent agency program , Assignment Help, Ask Question on A talent agency program , Get Answer, Expert's Help, A talent agency program Discussions

Write discussion on A talent agency program
Your posts are moderated
Related Questions
What is an Applets? Applets: These are small java programs. They can send from one to another computer over internet by using Applet Viewer which supports java. Applets

Create problem that solves cryptoarithmatic problem that uses from user using java

Point-to-Point : gives a traditional queue based mechanism where the client application forwards a message through a queue to typically one receiving client that accepts messages

Explain the term Event Handler? An event handler is a command that calls a function while an event happens, like as the user clicking a button.

Introduction In this assignment you will use Processing to create some geometric objects and graphical user interface (GUI) elements that Processing itself lacks. Processing h

Question 1: (a) What are the disadvantages of using HTML Frames in your web pages? (b) Give five examples of controls used inside HTML forms and the situation in which the

Objective The objective of this lab exercise is to develop a unit test suite using JUnit Specification of the Program to be Tested You are given the source code of a Java clas

in java string is a

How to get all the registered objects in a rmiregistry? Ans) Using list method of Naming Class.

1. Write the pseudocode to get the input of 10 integers from the user and add them up and output the total. (4 points) 2. Compute the output of following pseudocode. Assume that