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 javaapplication2;
- /**
- *
- * @author student
- */
- public class Student extends Persoana{
- private int mark;
- public Student(int mark, String nume){
- super(nume);
- this.mark = mark;
- }
- public Student(int mark)
- {
- this.mark = mark;
- this.nume = "default";
- }
- public Student()
- {
- this.mark = 0;
- this.nume = "default";
- }
- @Override
- public String toString() {
- return "Student:" + super.toString() + ","+this.mark;
- }
- public void invata(){
- System.out.println(this.nume + "invata");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement