package edu.umn.csci5801.model;

import java.util.List;

/**
 * Created by Justin on 12/2/2014.
 */
public class Requirement {
    private String name;
    private float gpa;
    private List<CourseTaken> courses;
    private int credits;
    private List<CompletedMilestone> milestones;
    private List<String> notes;

    //constructor
    public Requirement(){}
    public Requirement(String _name_) {
        name = _name_;
    }
    public Requirement(String _name_, float _gpa_) {
        name = _name_;
        gpa = _gpa_;
    }
    public Requirement(String _name_, float _gpa_, List<CourseTaken> _courses_, int _credits_,
                       List<CompletedMilestone> _milestones_, List<String> _notes_) {
        name = _name_;
        gpa = _gpa_;
        courses = _courses_;
        credits = _credits_;
        milestones = _milestones_;
        notes = _notes_;
    }
    public Requirement(String _name_, List<CourseTaken> _courses_, int _credits_,
                       List<String> _notes_) {
        name = _name_;
        courses = _courses_;
        credits = _credits_;
        notes = _notes_;
    }
    public Requirement(String _name_, float _gpa_, List<CourseTaken> _courses_, int _credits_,
                       List<String> _notes_) {
        name = _name_;
        gpa = _gpa_;
        courses = _courses_;
        credits = _credits_;
        notes = _notes_;
    }
    public Requirement(String _name_, List<CompletedMilestone> _milestones_, List<String> _notes_) {
        name = _name_;
        milestones = _milestones_;
        notes = _notes_;
    }

    public void setName(String n) { name = n; }
    public void setGpa(float g_p_a) { gpa = g_p_a; }
    public void setCourses(List<CourseTaken> coursesTaken) { courses = coursesTaken; }
    public void addCourse(CourseTaken ct) { courses.add(ct); }
    public void setCredits(int c) { credits = c; }
    public void setMilestones(List<CompletedMilestone> list) { milestones = list; }
    public void addMilestone(CompletedMilestone cm) { milestones.add(cm); }
    public void setNotes(List<String> list) { notes = list; }
    public void addNote(String note) { notes.add(note); }

    public float getGpa() { return gpa; }
    public int getCredits() { return credits; }
    public List<CompletedMilestone> getMilestones() { return milestones; }
    public List<CourseTaken> getCourses() { return courses; }
    public List<String> getNotes() { return notes; }
    public String getName() { return name; }

    private float gradeToFloat(Grade grade){
        float gradef = 0f;
        switch (grade) {
            case A: gradef = 4.0f;
            case B: gradef = 3.0f;
            case C: gradef = 2.0f;
            case D: gradef = 1.0f;
            case F: gradef = 0.0f;
        }
        return gradef;
    }

    public void calculateGpa() {

    }

}

@@ -140,22 +140,20 @@
 private 
-String
+Reqs
  name;%0D%0A
@@ -393,30 +393,28 @@
 Requirement(
-String
+Reqs
  _name_) %7B%0D%0A
@@ -459,38 +459,36 @@
 lic Requirement(
-String
+Reqs
  _name_, float _
@@ -564,38 +564,36 @@
 lic Requirement(
-String
+Reqs
  _name_, float _
@@ -920,38 +920,36 @@
 lic Requirement(
-String
+Reqs
  _name_, List%3CCo
@@ -1166,38 +1166,36 @@
 lic Requirement(
-String
+Reqs
  _name_, float _
@@ -1455,22 +1455,20 @@
 irement(
-String
+Reqs
  _name_,
@@ -1651,22 +1651,20 @@
 setName(
-String
+Reqs
  n) %7B na
@@ -2514,22 +2514,20 @@
  public 
-String
+Reqs
  getName

Update name from String to Reqs enum type