Solved

I have to create a class in a java code

Posted on 2014-12-09
3
111 Views
Last Modified: 2014-12-09
I know nothing in java and I have to:

Create a class 'Child' which inherits 'Parent'
0
Comment
Question by:Serra David Thomas
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Radek Baranowski earned 500 total points
ID: 40488543
public class Parent {
int Age;
String gender;
public Parent(String gen,int ag){
this.Age = ag;
this.Gender = gen;
}
}

public class Child extends Parent {
String birthDate;

public Child(String gen,int ag, String bd){
super(gen,ag);
this.birthDate=bd;
}
}

Open in new window


Pretty much it.

place both classes in separate files named Parent.java and Child.java

anything more specific you need ?
0
 

Author Comment

by:Serra David Thomas
ID: 40488555
It's working.
Thank you
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40488557
np. happy to help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 71
allswap challenge 6 79
Non-recursive backtracking, using a stack 1 101
Groovy problem when using SOAPUI : DispatchException occurred 7 27
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now