Find Jobs
Hire Freelancers

College Java Assignment

$30-5000 USD

Completed
Posted about 22 years ago

$30-5000 USD

Paid on delivery
Practical CPT12 Introduction to Programming in Java Questions - 6 Assignment - 3 Q1. Implement the classes Employee and AcademicEmployee discussed during the lectures, but now the salary must be a double, and therefore all the corresponding methods must change. The method setName() should be inherited down, but the method setSalary() should be overriden in AcademicEmployee. For employees displaySalary() should return the salary of the employee, while for academics it should return the salary plus a 10% bonus. Test your classes in a driver program EmployeeManager that: a) gets the information about an academic in a single line (tokens separated by blanks) b) tokenizes the line and instantiates a new academic with the values c) displays the values to the screen A user interaction could be Enter the academic employee info in a single line: Ronaldo 1234.56 PhD The information you entered was: Name: Ronaldo Salary: 1234.56 Qualification: PhD Q2. Extend the class AcademicEmployee to a class Professor. Include in your definition a new variable numberOfPostGrads and corresponding methods to set and return numberOfPostGrads. Define appropriate constructors for the class, using super when appropriate. Write a driver program similar to the one in Q1, but which also includes the new Professor information. ## Deliverables Assignment - 4 Q1. Write a program driver class called IntegerManager to manage an array of 10 Integer. Your program should get 10 int via the keyboard and instantiate an array of Integer with the values. Your program must calculate and print the sum of, and the average of, all the values. You must also write a method int largest(Integer[] a) that returns the index of the largest value in the array, and using that method find and print all the indices in the array with the largest value. Q2. Using the same class definition of the Practical Work Week 8, write a program driver class, which must be called EmployeeManager, that reads in 10 employees into an array of Employee objects and performs some basic operations. The input is a sequence of 10 lines from standard input: name:salary (the salary read does not include the bonus), where the tokens are separated by ':'. Your program must print Employee information as follows: 1. Print first all the information corresponding to Employees Type 1, with salaries less than or equal to $20,000, and then all the information corresponding to Employees Type 2, with salaries more than $20,000. Write appropriate methods to find the highest and the lowest salary of the whole collection, and print all the information corresponding to all the employees with the lowest and highest salaries 2. Use object methods to print the total tax paid by employees, broken down by Type (That is, total tax for Type 1 first and Type 2 second). The tax rates are 10% for Type 1, and 20% for Type 2. 3. Print the average of salary + bonus of the 10 employees, regardless of their type. Bonus is 5% for Type 1 employees, and 10% for Type 2 employees. Remarks: 1. Your driver classes have to be called IntegerManager and EmployeeManager respectively (You lose marks if this is not so) 2. You have to use appropriate object methods, as in Week 8, to find and print the corresponding information 3. You must make appropriate use of modifiers, keeping data private and using public methods where possible 4. Test your program EmployeeManager with a file called [login to view URL], containing 10 lines (plus 1 empty line) with the format: name:salary each line corresponding to an employee. To test your program you use the command: % java EmployeeManager < [login to view URL] The program should terminate when the input string read is the emtpy string, so remember to finish the data file [login to view URL] with an empty line (a Return by itself) for the program to terminate correctly. Complete and fully-functional working program(s) in executable form as well as complete source code of all work done in a simple [login to view URL] file. I need these assignments completed before the 1st of March 2002. Complete copyrights to all work purchased. ## Platform Java Platform ## Deadline information Must be completed on or before the 1st of March [login to view URL] a [login to view URL] file is all that's required for all 3 assignments.
Project ID: 2839958

About the project

8 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$1 USD in 14 days
5.0 (18 reviews)
2.9
2.9
8 freelancers are bidding on average $36 USD for this job
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (60 reviews)
5.0
5.0
User Avatar
See private message.
$63.75 USD in 14 days
4.7 (41 reviews)
4.7
4.7
User Avatar
See private message.
$25.50 USD in 14 days
4.7 (48 reviews)
4.3
4.3
User Avatar
See private message.
$22.95 USD in 14 days
4.7 (32 reviews)
3.3
3.3
User Avatar
See private message.
$34 USD in 14 days
4.8 (16 reviews)
3.1
3.1
User Avatar
See private message.
$34 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$85 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Australia
3.5
3
Member since Nov 2, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.