Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Adult {
- private String name;
- private String prof;
- private double height;
- public Adult(){
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getProf() {
- return prof;
- }
- public void setProf(String prof) {
- this.prof = prof;
- }
- public double getHeight() {
- return height;
- }
- public void setHeight(double height) {
- this.height = height;
- }
- public Adult(String name,String prof,double height)
- {
- this.name=name;
- this.prof=prof;
- this.height=height;
- }
- public Adult(String name,double height)
- {
- this.name=name;
- this.height=height;
- }
- public Adult(Adult other){
- name=other.name;
- prof=other.prof;
- height=other.height;
- }
- public void show(){
- System.out.println(name %);
- }
- }
- main==
- =========
- public class Tester {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement