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

CS508 ASSIGNMENT 2 DISCUSSION

Share This With Friends......

+ Click Here To Join also Our facebook study Group.

This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


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


Views: 4273

See Your Saved Posts Timeline

Attachments:

Replies to This Discussion

armaan bhai plz code bhe share kr den. 

so much thanks in advance 

plz   sent   code   plzz

Armaan can u share this code in written form?

so it may able to compile ..

Results images are also demanded as well in assignment

A-O-A 

       Armaan plzzzzzzz code b share kar dain

                

plz    post  correct   solution   today  is   extend   day 

Assalam o Alaikum koi right solution post ker dy please

public class Employee
{
private int EmployeeId;
private String CNIC;
private String Name;
private int Grade;
private float Salary;
private String Category;

public Employee(int EmployeeId, String CNIC, String Name, int Grade, float Salary, String category)
{
this.EmployeeId = EmployeeId;
this.CNIC = CNIC;
this.Name = Name;
this.Grade = Grade;
this.Salary = Salary;
this.Category = Category;
}

public Employee()
{

this (1,"123-456-789”, "Yasin"",200000,"I");
}
//setters
public void setId (int EmployeeId) {
this.EmployeeId = EmployeeId;
}
public void setCNIC (String CNIC)
{
this.CNIC = CNIC;
}
public void setName (String Name) {
this.Name = Name;
}
public void setGrade (int Grade)
{
this.Grade = Grade;
}
public void setCategory (String Category)
{
this.Category = Category;
}
//getters
public int getEmployeeId () {
return EmployeeId;
}
public int getCNIC ()
{
return CNIC;
}
public String getName () {
return Name;
}
public int getGrade ()
{
return Grade;
}
public int getSalary ()
{
return Salary;
}
public String getCategory ()
{
return Category;
}
// displaying employee object on console
public void display()
{
System.out.println("EmployeeId:" + EmployeeId + "\n Name: " + Name);
System.out.println("Employee CNIC: " + CNIC);
System.out.println("Employee Grade: " + Grade);
System.out.println("Employee Salary: " + Salary);
System.out.println("Employee Category: " + Category);
}
}

public class ContractEmployee extends Employee
{
private int bonus;
private int[] rollNo;
private int sum;

public ContractEmployee()
{

}
public ContractEmployee(int i, String cn, String n, int g,float s, String c, int b, int []roll, int sum)
{
super(i, cn, n, g, c, b);
bonus = b;
rollNo = roll;
sum = sum;
}

public void setBonus (int bonus)
{
this.rollNo[]=( 1,4,0,2,0,0,3,6,8 );

this.sum = sum + rollNo[0] + rollNo[1] + rollNo[2] + rollNo[3] + rollNo[4] +
rollNo[5] + rollNo[6] + rollNo[7];
this.bonus = sum*1000/2;
}

public int getSum()
{
return sum;
}

public int getroll()
{
return rollNo[0];
}

public void display()
{
super.display();

System.out.println("ContractEmployee Bonus: " + sum*1000/2);
}
}

public class PermanentEmployee extends Employee
{
private int Gratuity;
private Pension;

public PermanentEmployee()
{

}

public PermanentEmployee(int i, String cn, String n, int g, float s, String c, int gra, int p)
{
super(i, cn, n, g, s, c);
Gratuity = gra;
Pension = p;
}

public void setGratuity(int Gratuity)
{
this.Gratuity = 8;
}

public void setPension(int Pension)
{
this.Pension = Gratuity*3000;
}

public int getPension()
{
return Pension;
}

public int getGratuity()
{
return Gratuity;
}

public void display()
{
super.display();
System.out.println("PermanentEmployee Pension: " + Pension);
System.out.println("PermanentEmployee Gratuity: " + Gratuity);
}
public static void main(String args[])
{
System.out.println("Employee class object: ");
System.out.println("Contract Employee class object: ");
ContractEmployee cc = new ContractEmployee();
PermanentEmployee pp = new PermanentEmployee();
cc.display();
System.out.println("\n\n");
pp.display();
}
}

hi maha khan

still errors arahe hain 

kanwal same error

kanwal same error,, and line number 23 dikha sakti hain ap coding ki ??

errors 

RSS

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

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