Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.mycompany.ex19;
- public class Employee extends Person {
- private String company;
- public Employee(String name, String lastName, String company){
- // вызов конструктора базового класса
- // super - для вызова конструктора базового класса
- super(name, lastName);
- this.company = company;
- }
- public String getCompany() {
- return company;
- }
- public void setCompany(String company) {
- this.company = company;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement