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 javaapplication34;
- import java.util.List;
- /**
- *
- * @author Guest
- */
- public interface Student<T extends Number> {
- private String name="";
- private String surname;
- // private int age;
- private List<T> note;
- public Student(String name, String surname, int age) {
- this.name = name;
- this.surname = surname;
- this.age = age;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getSurname() {
- return surname;
- }
- public void setSurname(String surname) {
- this.surname = surname;
- }
- public int getAge() {
- return age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- public List<T> getNote() {
- return note;
- }
- public void setNote(List<T> note) {
- this.note = note;
- }
- public void setNotes(Integer ... notes){
- for(Integer nota: notes){
- note.add((T)nota);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement