Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the loginizer domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/gyanxifb/recruitmentdbranlu.in/wp-includes/functions.php on line 6114
How to create Relations with different types of Objects - Recruitment

How to create Relations with different types of Objects

This is an overview of my Protected Keywords Program this will help you to understand the concept very easily. Here i have created the different types of Packages for different functions.

package p1;

public class  C1{

  public int x;

  protected int y;

  int z;

  protected void m();

  private int u;

}

package p1;

public class  C2{

  C1 o=new C1();

  o.x;//?

  o.y;//?

  o.z;//?

  o.u;//?

  o.m()//?

}

package p1;

public class  C3 extends C1{

  status of x,y,z,u,and m()

}

package p2;
public class  C4 extends C1{

  status of x, y, z, u, and m()

}

package p2;
public class  C5 {

  C1 o=new C1();

  status of x, y, z, u, and m()

}

 

In this i have used the Overriding concept by using methods Overriding. The main use of this concept is to override the one with other.

class Homer {

char doh(char c) {

System.out.print(“doh(char)”);

return ‘d’;}

float doh(float f) {

System.out.print(“doh(float)”);

return 1.0f; }}

class Milhouse {}

class Bart extends Homer {

void doh(Milhouse m) {

System.out.print(“doh(Milhouse)”);}}

public class Hide {

public static void main(String[] args) {

Bart b = new Bart();

b.doh(1);

b.doh(‘x’);

b.doh(1.0f);

b.doh(new Milhouse());}}`

class Customer{

  private int cid;

  private static int counter =1000;

  public Customer(){cid=++counter; }

  public void displayCust(){

  System.out.println(“Custid :” +cid);}

  }

class RegCustomer extends Customer{

  private float dis;

  public RegCustomer(float x){ dis=x; }

  public void displayCust(){

  System.out.println(“Discount :” +dis); }

}

 

class PriCustomer extends Customer{

  private String as;

  public PriCustomer(String x){ as=x; }

  public void displayCust(){

  System.out.println(“Meme :” +as);}

}

class Retail{

  public static void main(String [] args){

  RegCustomer rc=new RegCustomer(10.5f);

  PriCustomer pc=new PriCustomer(“Gold”);

  rc.displayCust(); pc.displayCust();

  }

}

error: