Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Schedule::appendNoCheck(Course course)
- {
- Node* n = new Node(course);
- if (head == nullptr) {
- head = n;
- }
- else {
- Node* temp = head;
- while (temp->next != nullptr) {
- temp = temp->next;
- }
- temp->next = n;
- }
- this->totalCredits = this->totalCredits + course.getCredits();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement