answersLogoWhite

0

Just create a class that has two fields of object type. For example, to store data about a person, you might store a name (String object) and a birth date (Date or Calendar object).

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

You want multilevel inheritance program in java?

A Scenario where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior from yet another class. Ex: public class Automobile {…} Public class Car extends Automobile {…} Public class Ferrari extends Car {…} This multilevel inheritance actually has no limitations on the number of levels it can go. So as far as java goes, it is limitless. But for maintenance and ease of use sakes it is better to keep the inheritance levels to a single digit number.


Type of inheritance?

There are 2 Types of genetic Inheritance. 1. Polygenic inheritance, also known as quantitative or multi-factorial inheritance refers to inheritance of a phenotypic characteristic (trait) that is attributable to two or more genes and their interaction with the environment. Polygenic traits do not follow patterns of Mendelian inheritance (qualitative traits). Instead, their phenotypes typically vary along a continuous gradient depicted by a bell curve. Eye color and skin color are both polygenetic traits. 2. Monogenic inheritance is controlled by a single gene, as opposed to multigenic.


Write program java explain use abstract class multilevel inheritance?

Multilevel inheritance is a java feature where the properties of a class are inherited by a class which extends one or more classes which extend its features...Example:public class A {public String getName(){return "Vijay";}}public class B extends A {public int getAge() {return 24;}}public class C extends B {public String getAddress(){return "Utter Pradesh,INDIA";}}public class D extends C {public void print {System.out.println(getName());System.out.println(getAge());System.out.println(getAddress());}}This method would print the following in the console:Vijay24Pradesh,INDIAHere in class D you are calling methods that are available inside classes A, B & C. Though D extends only class C, it would in turn inherit the properties of the classes extended by C and its parents.This is multi level inheritance.


Simple hierarchical inheritance program in java?

Multilevel inheritance is a java feature where the properties of a class are inherited by a class which extends one or more classes which extend its features...Example:public class A {public String getName(){return "Rocky";}}public class B extends A {public int getAge() {return 24;}}public class C extends B {public String getAddress(){return "North Carolina, USA";}}public class D extends C {public void print {System.out.println(getName());System.out.println(getAge());System.out.println(getAddress());}}This method would print the following in the console:Rocky24North Carolina, USAHere in class D you are calling methods that are available inside classes A, B & C. Though D extends only class C, it would in turn inherit the properties of the classes extended by C and its parents.This is multi level inheritance.


A c program to manage a bank system using inheritance and not using the concept of file handling?

using with files

Related Questions

You want multilevel inheritance program in java?

A Scenario where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior from yet another class. Ex: public class Automobile {…} Public class Car extends Automobile {…} Public class Ferrari extends Car {…} This multilevel inheritance actually has no limitations on the number of levels it can go. So as far as java goes, it is limitless. But for maintenance and ease of use sakes it is better to keep the inheritance levels to a single digit number.


What is inheritance Describe its various types with the help of program?

Inheritance is a mechanism in OOP where a new class inherits properties and behaviors from an existing class. The various types of inheritance include single inheritance (one class inherits from only one class), multiple inheritance (one class inherits from multiple classes), and multilevel inheritance (one class inherits from another which in turn inherits from another). Example of single inheritance: class Parent: def __init__(self, name): self.name = name class Child(Parent): def __init__(self, name, age): super().__init__(name) self.age = age child = Child("Alice", 25) print(child.name) print(child.age)


Write a C program to declare result of a student using multilevel?

This is a statement with a question mark?


Type of inheritance?

There are 2 Types of genetic Inheritance. 1. Polygenic inheritance, also known as quantitative or multi-factorial inheritance refers to inheritance of a phenotypic characteristic (trait) that is attributable to two or more genes and their interaction with the environment. Polygenic traits do not follow patterns of Mendelian inheritance (qualitative traits). Instead, their phenotypes typically vary along a continuous gradient depicted by a bell curve. Eye color and skin color are both polygenetic traits. 2. Monogenic inheritance is controlled by a single gene, as opposed to multigenic.


Using console application show the use of inheritance in your program?

inheritance is purpose of deriving one class from other class and it is reusabilty of code..


Short note on inheritance?

Inheritance is used object oriented program. When you create a class, you can create a child class that inherits methods and data from the parent class.


Write program java explain use abstract class multilevel inheritance?

Multilevel inheritance is a java feature where the properties of a class are inherited by a class which extends one or more classes which extend its features...Example:public class A {public String getName(){return "Vijay";}}public class B extends A {public int getAge() {return 24;}}public class C extends B {public String getAddress(){return "Utter Pradesh,INDIA";}}public class D extends C {public void print {System.out.println(getName());System.out.println(getAge());System.out.println(getAddress());}}This method would print the following in the console:Vijay24Pradesh,INDIAHere in class D you are calling methods that are available inside classes A, B & C. Though D extends only class C, it would in turn inherit the properties of the classes extended by C and its parents.This is multi level inheritance.


What is the relation between software with program?

Software and program is exactly the same. The most common is software but some people like to use the term, program.


What is MATCH multilevel approach to community health?

MATCH (Multilevel Approach to Community Health) is an ecological planning perspective that recognizes that intervention approaches can and should be aimed at a variety of objectives and individuals. (B. Simons-Morton, personal communication, October 10, 1999) Generally it is one of the main models for program planning in health promotion. There are 5 phases in this model.


What are the features of object oriented program?

The features of object oriented programming are Abstraction, Encapsulation, Polymorphism & Inheritance


How should colleges manage their athletic program in relation to their academic goals?

ha


Example of the responsibility program?

Sponsoring orphans and bright kids is an example of a responsibility program.

Trending Questions
How much does a drill press cost? Can a friend function of derived class access private data of base class? How should you convert cgpa into percentage and also to calculate marks obtained you have done engg from BPUT and have secured 7.16 out of 10? Write a program using method plainto check whether a string is a palindrome or not A palindrome is a string that reads the same from left to right and vice-versa? Why CC configuration is preferred for buffering? What is the advantages of screw conveyor? Should you use sand in your basement window wells? In a series circuit each device that is added to circuit decreases the? Is it possible to design a wind turbine involving a power electronic converter that will function typically in the US operating at 240V in residential households or in other settings? What is the gauge equivalent of schedule 40 pipe? WHAT CAN BE Maximum step up ratio in a transformer? Can you single phase 220VAC in place of three phase 220VAC? In a combination of a parallel and series circuit what would happen if a light bulb was unscrewed? What will happen if a 88kv bushing is installed in a 132kv rated transformer? What design element helps your reader focus on the important information in your technical document? How to draw NOT gate using NPN transistor? Why did he invent rubber? If you have low voltage lights in your yard and you want to install a decorative street lamp how do you increase the voltage to power the 120V street lamp? How much money do you get being a constructor? Who developed the practical steam engine in 1705?