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
How can you justify that a DBMS is better to use than Flat-file database? A DBMS takes care of the storage, retrieval, and management of large data sets on a Database. It give

Explain java.util.Random package? The java.util.Random class permits you to create objects which generates pseudo-random numbers along with uniform or gaussian distributions ac

Using Fork() and Exec() or Clone(), create four child processes. Load the same "Hello" program in each process after creation. This program should behave differently in each pro

When MalformedURLException and UnknownHostException throws? Ans) When the particular URL is not connected then the URL throws MalformedURLException and If InetAddress? methods g

Did Java support hybrid inheritance?

I want to upload an item object with it''s image is it possible that i pass a complete object of my Item along with it''s image from my Controller if yes then how may i Do it? an


Problem 1 A savings account object holds a non-negative balance, and provides deposit(k ) and withdraw(k ) methods, where deposit(k ) adds k to the balance, and withdraw(k ) subtra

Write a program to explain do while loop in Java ? // This is the Hello program in Java class Hello { public static void main (String args[]) { int i = -1; do { if (

Explain garbage collection. Java uses garbage collection to free the memory. By cleaning those objects which is no longer reference by any of the program. Step involve in clean