We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

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

CS508 ASSIGNMENT 2 DISCUSSION


+ 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)


Views: 4406

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

Latest Activity

+M.Tariq Malik replied to +M.Tariq Malik's discussion MTH102 Assignment 01 Fall 2020 Solution / Discussion in the group MTH102 Basic Algebra and Trigonometry
36 seconds ago
■ T̲h̲e̲ ̲J̲o̲k̲e̲r̲ ■ liked +M.Tariq Malik's group CS304 Object Oriented Programming
5 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS603 Assignment 01 Fall 2020 Solution / Discussion Due Date: 26-11-2020 in the group CS603 Software Architecture and Design
5 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS402 Assignment 01 Fall 2020 Solution / Discussion in the group CS402 Theory of Automata
7 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS402 Assignment 01 Fall 2020 Solution / Discussion in the group CS402 Theory of Automata
7 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion FIN625 GDB No 01 Fall 2020 Solution / Discussion Last Date: 27-11-2020 in the group FIN625 Credit & Risk Management
12 minutes ago
+M.Tariq Malik replied to Waseem Aziz's discussion GDB MGT101 - Financial Accounting Friday, November 27, 2020 in the group MGT101 Financial Accounting
14 minutes ago
Profile IconSyed Ali Haider Shah, Hafsa MAryam, somia adeel and 11 more joined Virtual University of Pakistan
14 minutes ago
+M.Tariq Malik liked ++!!Zuni Khan(Am Cyco)'s discussion mgt101 GDB solution fall 2020
15 minutes ago
+M.Tariq Malik replied to Waseem Aziz's discussion GDB MGT101 - Financial Accounting Friday, November 27, 2020 in the group MGT101 Financial Accounting
17 minutes ago
Farhan Ali Khan replied to +M.Tariq Malik's discussion ENG301 Online Quiz No 01 Fall 2020 Solution Discussion in the group ENG301 Business Communication
18 minutes ago
Farhan Ali Khan joined +M.Tariq Malik's group
18 minutes ago

Looking For Something? Search Here

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

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

.