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

www.vustudents.ning.com

# CS508 Assignment No 02 Solution & Discussion Due Date: 17-01-2018

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

Views: 3278

.

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

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

Attachments:

### Replies to This Discussion

plz start disscution about Assignment # 2.....

sub soo rahey hi kiya

koi idea

today last day

sab so rhy hain yahan

ap ne khud try kia ?

public class Employee
{
private int id;
private int cnic;
private String name;
private int salary;
private String categ;

public Employee( int employeeId, int employeeCnic, String employeeName, int employeeGrade, int employeeSalary, String employeeCateg)
{
id = employeeId;
cnic = employeeCnic;
name = employeeName;
salary = employeeSalary;
categ = employeeCateg;

}
Employee()
{
System.out.println("Enter ID of the Employee:");
id = get.nextLine();
System.out.println("Enter CNIC of the Employee:");
cnic = get.nextLine();
System.out.println("Enter Name of the Employee:");
name = get.nextLine();
System.out.println("Enter Salary of the Employee:");
salary = get.nextLine();
System.out.println("Enter Category of the Employee (I, C, P):");
categ = get.nextLine();
}
void display()
{
System.out.println("Employee ID: "+ id);
System.out.println("Employee CNIC: "+ cnic);
System.out.println("Employee Name: "+ name);
System.out.println("Salary: "+ salary);
System.out.println("Category: "+ categ);
}
class contractEmployee extends Employee
{
int bonus;
contractEmployee()
{
System.out.println("Enter Salary:");
salary = get.nextFloat();
}
void display()
{
System.out.println("=============================="+"\n"+"Full Time Employee Details"+"\n"+"=============================="+"\n");
super.display();
System.out.println("Salary: "+salary);
}
}
class permanentEmployee extends Employee
{
int gratuatiy, pension;
permanentEmployee()
{
System.out.println("Enter Number of Working Hours:");
gratuatiy = get.nextInt();
}
void calculatepay()
{
pension = ;
}

void display()
{
System.out.println("=============================="+"\n"+"Part Time Employee Details"+"\n"+"=============================="+"\n");
super.display();
System.out.println("Number of Working Hours: "+pension);
System.out.println("Salary for "+gratuatiy+" working hours is: \$"+pension);
}
}

class Employee
{
public static void main(String args[])
{
System.out.println("================================"+"\n"+"Enter Full Time Employee Details"+"\n"+"================================"+"\n");
permanentEmployee ob1 = new permanentEmployee();
contractEmployee ob = new contractEmployee();
System.out.println("================================"+"\n"+"Enter Part Time Employee Details"+"\n"+"================================"+"\n");
ob1.display();
ob.calculatepay();
ob.display();
}
}

}

Employee.java:72: error: illegal start of expression
pension = ;

same error

Bhai logo es code ko likny k ly java install kro ya visual studio plz reply fast

kuch bi install krny ki zarort nai hy bas jo assignment ma link diya hua us ma code likho r run kro

thanx  ROMEO

## Latest Activity

+ M.Tariq Malik's 60 discussions were featured
2 minutes ago

1

2

3