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
1.) Write an application with two user transactions (login which includes viewAllStudents and viewStudent ) with full MVC architecture that displays the details of the selected

The different types of actions in Struts are: ? DispatchAction ? LookupDispatchAction ? ForwardAction ? SwitchAction ? IncludeAction

Give an example of Class or static Members? Below is a Car class along with such a speedLimit field and getSpeedLimit() method. public class Car { private String licensePla

Design A Word document/ report containing program design documentation, including UML diagrams (Use case, class and sequence) and written descriptions of each class or module

Normal 0 false false false EN-IN X-NONE X-NONE


Describe The ? operator in Java langauge? The conditional operator just works for assigning a value to a variable, using a value within a method invocation, or in a few other w

Problem : Compiler Design - Limit the loops Rajni is a newbie to the programming and while learning the programming language he came to know the following rules: ???• Each program


Struts Framework gives the functionality to validate the form data. It can be use to authenticate the data on the users browser as well as on the server side. Struts Framework emit