A talent agency program , JAVA Programming

Assignment Help:

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());
   }
}


Related Discussions:- A talent agency program

Javascript work, It could be something simple for a good js coder. But ther...

It could be something simple for a good js coder. But there may be a custom design and I can give more feedback for the person who is interested in working with me. Check Invisi

Type of messaging is given by jms, Point-to-Point : gives a traditional qu...

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

Function and array in java script, Specifications 1. readNumberOfEntri...

Specifications 1. readNumberOfEntries → This function will ask the user for a value greater than or equal to two. The function will keep asking values as long as the user prov

Explain the importance of abstract classes in java, Question: (a) Expl...

Question: (a) Explain the importance of abstract classes in Java with an appropriate example. (b) Explain what is meant by an interface in Java? Use a simple example to il

Create a graphical reverse polish notation calculator, In this assignment y...

In this assignment you will create a graphical reverse polish notation calculator using a stack data structure.  A reverse polish notation calculator allows you to perform chain ca

Multithreading, For this assignment we will be solving the producer-consume...

For this assignment we will be solving the producer-consumer problem with a bounded buffer. You are required to implement this assignment in Java. There are three components in thi

USES OF JAVA PROGRAMMING, WHY WE USE JAVA IN PROGRAMMING INSTEAD OF OTHER P...

WHY WE USE JAVA IN PROGRAMMING INSTEAD OF OTHER PROGRAMMING LANGUAGE

Convert US Dollars to Canadian Dollars, How to write a program that convert...

How to write a program that converts US dollars into Canadian dollars.The program let the user enter an amount in US dollars and display it equivalent value in Canadian dollars whe

Explain the term- comparing strings, Explain the term- Comparing Strings ...

Explain the term- Comparing Strings For comparing Strings never use == operator, use equals method of String class. - == operator compares addresses (shallow comparison) whi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd