package course;

import lombok.*;

@Getter
@Setter
@AllArgsConstructor
@ToString
@NoArgsConstructor
public class CourseInfo {
    private int id;
    private String name;
    private int type;
    private float credit;
    private int grade;
    private int major;
    private String detail;

    public String toJSON(){
        String json="{";
        json += "\"id\":"+id+",";
        json += "\"name\":\""+name+"\",";
        json += "\"type\":"+type+",";
        json += "\"credit\":"+credit+",";
        json += "\"grade\":"+grade+",";
        json += "\"major\":"+major+",";
        json += "\"detail\":\""+detail+"\"";
        json += "}";
        return json;
    }
}
