Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Nodes
- {
- class Class
- {
- private Node<Student> students;
- public Class(Node<Student> students)
- {
- this.students = students;
- }
- public Node<Student> getStudents()
- {
- return this.students;
- }
- private Node<Student> current;
- public void addSubject(Student student)
- {
- Node<Student> t = new Node<Student>(student);
- if (this.students == null)
- {
- this.students = t;
- }
- else
- {
- this.current.setNext(t);
- }
- this.current = t;
- }
- }
- }
Add Comment
Please, Sign In to add comment