We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Lectures Covered : 27-30

The objective of this assignment is to enhance knowledge of Java Programming:
1. It will increase learning of Java data types, classes concepts
2. Hand on experience of arrays
3. Students will be able to implement Inheritance and Over riding

Please read the following instructions carefully before solving & submitting the assignment:
1. The assignment will not be accepted after due date.
2. Zero marks will be awarded to the assignment that does not open or the file is
3. The assignment file must be MS Word (.doc) file format; Assignment will not be
accepted in any other format.
4. Zero marks will be awarded to the assignment if copied (from other student or copied
from handouts or internet).
5. Zero marks will be awarded to the assignment if the Student ID is not mentioned in
the assignment file.
Note: All types of plagiarism are strictly prohibited. Copy cases will be awarded
zero marks.

Question No 1:
Suppose a textile company “Grace Textile” human resource (HR) department. It has total 80
employees in 3 different branches. Employees are of 3 categories: Internees, Contract and Permanent
employees. Internees have internship of 6 months with fixed salary i.e, 20 thousand. Salaries are
calculated on basis of grades. Both contract and permanent employees have different pay scales.
Permanent employees also got benefits of pension and gratuity .Contract employees get monthly
salary and an annual additional bonus.
You are required to write a Java program comprising :
Three Classes Employee, Contract Employee, Permanent Employee
Employee class will have basic attributes of “Employee Id”, CNIC, Name, Grade, Salary and
Category (Internee, Contract, and Permanent). Use “I” for internee, “C” for “Contract” and
“P” for permanent
CNIC will be of format 123-456-789
Contract Employee class will have attributes/data members of Employee class and an
additional member “Bonus”
Permanent Employee class will have attributes of Employee class along with 2 additional
attributes “Gratuity” and “Pension”
Use proper data types for all data members
Write display message of base class and derived classes which will print Emp Id of respective
Write a function for Contract Employee Class that will calculate bonus. Roll number will be
stored in an array. Roll number will be your own vu id only digits (8 digits excluding first 2
characters). E.g, If your Roll number is BC12345678, 12345678 will be stored in array. Add
all 8 digits and name it “sum
”. Calculate bonus with formula: (sum*1000)/2; Print value of
Steps to Compile /Execute Java Program:

Open following link :
Here you can compile and execute your Java Code with(JDK 1.8.0)*.
1. Paste/replace your code
“Execute” program
3. Take screen shot of code plus result
4. Copy it in .doc file
5. Your assignment should be in .doc or .docx format
Hints: You will use inheritance and overriding for display function.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 3304


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Replies to This Discussion

cs508 assgmnt solution



Latest Activity

٢٣ دن updated their profile
13 minutes ago
Rana Ali replied to Rana Ali's discussion waqat
15 minutes ago
Rana Ali replied to Rana Ali's discussion waqat
17 minutes ago
waniya chaudhary updated their profile
21 minutes ago
Rana Ali liked Rana Ali's discussion waqat
27 minutes ago
Rana Ali posted discussions
28 minutes ago
Rana Ali liked Rehman's discussion A.R
46 minutes ago
Rana Ali replied to Rana Ali's discussion EDU302 Assignment NO 2 (Fall 2019) in the group EDU302 Human Development and Learning
49 minutes ago
Rana Ali replied to Rana Ali's discussion EDU201 Learning Theories Assignment No 01 Fall 2019 Solution & Discussion in the group EDU201 Learning Theories
54 minutes ago
DUA FATIMA joined + M.Tariq Malik's group
1 hour ago
Rehman updated their profile
2 hours ago
Muqaddas liked Muqaddas's profile
2 hours ago

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service