Bitcoin Forum
May 24, 2024, 02:47:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Java Homework  (Read 328 times)
Bolton58 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 04, 2017, 04:06:37 AM
 #1

I need help on my Java homework. Can pay in BTC

This is one of the complicated questions:

Define the Employee abstract superclass from which specific types of Employee's can be derived.  This abstract class contains one instance variable; name. (4 points)

This class should contain a default constructor.
This class should contain a constructor which can be used to pass in the name of the Employee.
This class should contain the getName() method to retrieve the name instance variable
This class should contain the setName() method to set the name instance variable.
This class should contain an abstract method, getSalary(), which is not defined in this class because determining the salary of an Employee is dependent on the Employee type.
Define two derived classes from the Employee superclass: (2 points each)

The Commission class should be derived from the Employee class  The salary for this type of employee is based on a sales commission percentage.
The Hourly class should be derived from the Employee class.  The salary for this type of employee is based on a base pay plus tips collected. 
Each derived class should contain constructors, which call the constructor of the superclass.

Each class should implement a toString() method to provide a formatted output of the name, as well as the salary based on the Employee type.

Examples:

   Commission  employee1 = new Commission( "Wendy Smith", 40000, 4 );
   Hourly      employee2 = new Hourly( "Bruno Hildago", 800, 325 );

   System.out.println( employee1 );
      may result in an output of
   Wendy Smith salary is $1600.00

   System.out.println( employee2 );
      may result in an output of
   Bruno Hildago salary is $1125.00


This is a simple question:


Given the following array declaration:

int[] flowers = { 4, 16, 12, 7, 1, 5, 3 };
   
What is the value of the first element?

   
What is the value of flower.length?

   
What is the value contained in third element?

   
What is the array index for the last array element?

A.4

B.7

C.12

D.6




xhomerx10
Legendary
*
Offline Offline

Activity: 3850
Merit: 8179



View Profile
June 04, 2017, 04:18:20 AM
 #2

I need help on my Java homework. Can pay in BTC

This is one of the complicated questions:

Define the Employee abstract superclass from which specific types of Employee's can be derived.  This abstract class contains one instance variable; name. (4 points)

This class should contain a default constructor.
This class should contain a constructor which can be used to pass in the name of the Employee.
This class should contain the getName() method to retrieve the name instance variable
This class should contain the setName() method to set the name instance variable.
This class should contain an abstract method, getSalary(), which is not defined in this class because determining the salary of an Employee is dependent on the Employee type.
Define two derived classes from the Employee superclass: (2 points each)

The Commission class should be derived from the Employee class  The salary for this type of employee is based on a sales commission percentage.
The Hourly class should be derived from the Employee class.  The salary for this type of employee is based on a base pay plus tips collected. 
Each derived class should contain constructors, which call the constructor of the superclass.

Each class should implement a toString() method to provide a formatted output of the name, as well as the salary based on the Employee type.

Examples:

   Commission  employee1 = new Commission( "Wendy Smith", 40000, 4 );
   Hourly      employee2 = new Hourly( "Bruno Hildago", 800, 325 );

   System.out.println( employee1 );
      may result in an output of
   Wendy Smith salary is $1600.00

   System.out.println( employee2 );
      may result in an output of
   Bruno Hildago salary is $1125.00


This is a simple question:


Given the following array declaration:

int[] flowers = { 4, 16, 12, 7, 1, 5, 3 };
   
What is the value of the first element?

   
What is the value of flower.length?

   
What is the value contained in third element?

   
What is the array index for the last array element?

A.4

B.7

C.12

D.6



This might help you - https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
It's much better if you do it yourself or you will never learn it.  Ask questions only on the things you require help with.

Bolton58 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 04, 2017, 04:38:43 AM
 #3

I don't have much time since this is due in a few hours
Enre
Sr. Member
****
Offline Offline

Activity: 617
Merit: 256

ICO Accelerator & Consultant


View Profile
June 04, 2017, 04:54:57 AM
 #4

I can help you out, how much are you paying?
Looks like a not too tough job i guess
Thal
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
June 04, 2017, 11:19:40 AM
 #5

i Have already done it for you : https://ibb.co/dxJ3Lv

Contact me  Wink
xhomerx10
Legendary
*
Offline Offline

Activity: 3850
Merit: 8179



View Profile
June 04, 2017, 12:49:48 PM
 #6

I don't have much time since this is due in a few hours

 Well that was one possibility I hadn't considered.  I went to bed shortly after replying but I hope you were able to finish your homework.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!