Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- public class Course {
- private String name;
- private int hours;
- private String grade;
- public Course(){
- }
- public Course(String cn, int ch, String cg){
- setCourseName(cn);
- setCourseHours(ch);
- setCourseGrade(cg);
- }
- public void setCourseName(String cn){
- name = cn;
- }
- public void setCourseHours(int ch){
- hours = ch;
- }
- public void setCourseGrade(String cg){
- grade = cg;
- }
- public String getCourseName(){
- return name;
- }
- public int getCourseHours(){
- return hours;
- }
- public String getCourseGrade(){
- return grade;
- }
- }
Add Comment
Please, Sign In to add comment