Author

Topic: Java Homework (Read 354 times)

legendary
Activity: 3808
Merit: 7912
June 04, 2017, 07:49:48 AM
#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.
newbie
Activity: 51
Merit: 0
June 04, 2017, 06:19:40 AM
#5
i Have already done it for you : https://ibb.co/dxJ3Lv

Contact me  Wink
sr. member
Activity: 617
Merit: 256
ICO Accelerator & Consultant
June 03, 2017, 11:54:57 PM
#4
I can help you out, how much are you paying?
Looks like a not too tough job i guess
newbie
Activity: 24
Merit: 0
June 03, 2017, 11:38:43 PM
#3
I don't have much time since this is due in a few hours
legendary
Activity: 3808
Merit: 7912
June 03, 2017, 11:18:20 PM
#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.

newbie
Activity: 24
Merit: 0
June 03, 2017, 11:06:37 PM
#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




Jump to: