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 are the different scopes for Java variables? The scope of a Java variable is explained by the context in which the variable is declared. Therefore a java variable can have

What is Invoking static methods If a method or field is declared static, you access it through using the class name rather than a reference to a particular example of the class

Write an application that uses an Array to store 10messages of type String. You will store this Array with 10 messages of your choosing. For example, a message could be “I love Jav

Design and implement an application that reads a sequence of up to 25 pairs of names and postal (ZIP) codes for individuals. Store the data in an object designed to store a first n

Objectives _ Creating and compiling a simple program _ Designing classes _ Use of recursive algorithms _ Learn basic combinatorics   Task: string permutation Writ

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

Develop a Custom Android App Project Description: We want you to construct a custom Android app. Once user downloads the app and upon installation the user gets push notif

What is Initializing Fields ? Fields can (and often should) be initialized while they're declared, just like local variables. class Car { String licensePlate = ""; // e.g

Here are some features of spring:- ? Lightweight: spring is lightweight when it comes to size and transparency. The essential version of spring framework is around 1MB. And t