Populate a tableview in javafx - java

I have a tableview in javafx which i want to populate with objects type Course. The idea is that in my Course class, I hava a composite primary key which is a diifferent class CourseId. I want to add in one column of the tableview the courseno which is present in CourseId class, but i dont know how to get it.
My course class:
package com.licenta.ascourses.ui.model;
import java.io.Serializable;
public class Course implements Serializable {
private CourseId idCourse = new CourseId();
private int year;
private int semester;
private String discipline;
private String professor;
public Course() {
}
public Course(CourseId idCourse, int year, int semester) {
super();
this.idCourse = idCourse;
this.year = year;
this.semester = semester;
}
public Course(CourseId idCourse, int year, int semester, String discipline, String professor) {
this.idCourse=idCourse;
this.year = year;
this.semester = semester;
this.discipline = discipline;
this.professor = professor;
}
public CourseId getIdCourse() {
return idCourse;
}
public void setIdCourse(CourseId idCourse) {
this.idCourse = idCourse;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public int getSemester() {
return semester;
}
public void setSemester(int semester) {
this.semester = semester;
}
public String getDiscipline() {
return discipline;
}
public void setDiscipline(String discipline) {
this.discipline = discipline;
}
public String getProfessor() {
return professor;
}
public void setProfessor(String professor) {
this.professor = professor;
}
}
My courseId class:
package com.licenta.ascourses.ui.model;
import java.io.Serializable;
public class CourseId implements Serializable {
private int idDiscipline;
private int idProfessor;
private int courseNo;
public CourseId() {
}
public CourseId(int idDiscipline, int idProfessor, int courseNo) {
super();
this.idDiscipline = idDiscipline;
this.idProfessor = idProfessor;
this.courseNo = courseNo;
}
public int getIdDiscipline() {
return idDiscipline;
}
public void setIdDiscipline(int idDiscipline) {
this.idDiscipline = idDiscipline;
}
public int getIdProfessor() {
return idProfessor;
}
public void setIdProfessor(int idProfessor) {
this.idProfessor = idProfessor;
}
public int getCourseNo() {
return courseNo;
}
public void setCourseNo(int courseNo) {
this.courseNo = courseNo;
}
public boolean equals(Object o) {
return true;
}
public int hashCode() {
return 1;
}
}
columnNumarCurs.setCellValueFactory(new PropertyValueFactory<Course, Integer>(""));
columnAn.setCellValueFactory(new PropertyValueFactory<Course, Integer>("year"));
columnSemestru.setCellValueFactory(new PropertyValueFactory<Course, Integer>("semester"));
columnDisciplina.setCellValueFactory(new PropertyValueFactory<Course, String>("discipline"));
columnProfesor.setCellValueFactory(new PropertyValueFactory<Course, String>("professor"));

The setCellValueFactory method requires a Callback<CellDataFeatures, ObservableValue>: i.e. a function that maps a CellDataFeatures object to an ObservableValue containing the value to be displayed. Since the value you have is an int, and assuming columnNumarCurs is a TableColumn<Course, Number>, the appropriate ObservableValue type is an IntegerProperty. So you can do:
columnNumarCurs.setCellValueFactory(
cellData -> new SimpleIntegerProperty(cellData.getValue().getIdCourse().getCourseNo()));

Related

Null Pointer at foreign key

I'm using MySQL and Hibernate. I've added record to Receiving table and have id and barcode fields as foreign keys in transaction table rcid and barcode.
When I search a specific record using id:
int id =(Integer)defaultTableModel.getValueAt(jReceivingsTable.getSelectedRow(),0);
Receivings receivings = manager.searchReceivingsId(id);
that doesn't null, printing id return appropriate value so why I'm getting null when I set it to Transaction table?
Rctransaction rctransaction = new Rctransaction();
rctransaction.getReceivings().getId().setId(id); // here id has value
rctransaction.getReceivings().getId().setBarcode(barcode);
rctransaction.setReceivings(receivings);
Here are classes :
Receivings.java
public class Receivings implements java.io.Serializable {
private ReceivingsId id;
private Suppliers suppliers;
private String itemName;
private String category;
private double wholesalePrice;
private double retailPrice;
private long tax1;
private long tax2;
private String type1;
private String type2;
private int quantityStock;
private int receivingQuantity;
private int recorderLevel;
private String receivingDate;
private double discount;
private Set itemses = new HashSet(0);
private Set rctransactions = new HashSet(0);
public Receivings() {
}
public Receivings(ReceivingsId id, Suppliers suppliers, String itemName, String category, double wholesalePrice, double retailPrice, long tax1, long tax2, String type1, String type2, int quantityStock, int receivingQuantity, int recorderLevel, String receivingDate, double discount) {
this.id = id;
this.suppliers = suppliers;
this.itemName = itemName;
this.category = category;
this.wholesalePrice = wholesalePrice;
this.retailPrice = retailPrice;
this.tax1 = tax1;
this.tax2 = tax2;
this.type1 = type1;
this.type2 = type2;
this.quantityStock = quantityStock;
this.receivingQuantity = receivingQuantity;
this.recorderLevel = recorderLevel;
this.receivingDate = receivingDate;
this.discount = discount;
}
public Receivings(ReceivingsId id, Suppliers suppliers, String itemName, String category, double wholesalePrice, double retailPrice, long tax1, long tax2, String type1, String type2, int quantityStock, int receivingQuantity, int recorderLevel, String receivingDate, double discount, Set itemses, Set rctransactions) {
this.id = id;
this.suppliers = suppliers;
this.itemName = itemName;
this.category = category;
this.wholesalePrice = wholesalePrice;
this.retailPrice = retailPrice;
this.tax1 = tax1;
this.tax2 = tax2;
this.type1 = type1;
this.type2 = type2;
this.quantityStock = quantityStock;
this.receivingQuantity = receivingQuantity;
this.recorderLevel = recorderLevel;
this.receivingDate = receivingDate;
this.discount = discount;
this.itemses = itemses;
this.rctransactions = rctransactions;
}
public ReceivingsId getId() {
return this.id;
}
public void setId(ReceivingsId id) {
this.id = id;
}
public Suppliers getSuppliers() {
return this.suppliers;
}
public void setSuppliers(Suppliers suppliers) {
this.suppliers = suppliers;
}
public String getItemName() {
return this.itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getCategory() {
return this.category;
}
public void setCategory(String category) {
this.category = category;
}
public double getWholesalePrice() {
return this.wholesalePrice;
}
public void setWholesalePrice(double wholesalePrice) {
this.wholesalePrice = wholesalePrice;
}
public double getRetailPrice() {
return this.retailPrice;
}
public void setRetailPrice(double retailPrice) {
this.retailPrice = retailPrice;
}
public long getTax1() {
return this.tax1;
}
public void setTax1(long tax1) {
this.tax1 = tax1;
}
public long getTax2() {
return this.tax2;
}
public void setTax2(long tax2) {
this.tax2 = tax2;
}
public String getType1() {
return this.type1;
}
public void setType1(String type1) {
this.type1 = type1;
}
public String getType2() {
return this.type2;
}
public void setType2(String type2) {
this.type2 = type2;
}
public int getQuantityStock() {
return this.quantityStock;
}
public void setQuantityStock(int quantityStock) {
this.quantityStock = quantityStock;
}
public int getReceivingQuantity() {
return this.receivingQuantity;
}
public void setReceivingQuantity(int receivingQuantity) {
this.receivingQuantity = receivingQuantity;
}
public int getRecorderLevel() {
return this.recorderLevel;
}
public void setRecorderLevel(int recorderLevel) {
this.recorderLevel = recorderLevel;
}
public String getReceivingDate() {
return this.receivingDate;
}
public void setReceivingDate(String receivingDate) {
this.receivingDate = receivingDate;
}
public double getDiscount() {
return this.discount;
}
public void setDiscount(double discount) {
this.discount = discount;
}
public Set getItemses() {
return this.itemses;
}
public void setItemses(Set itemses) {
this.itemses = itemses;
}
public Set getRctransactions() {
return this.rctransactions;
}
public void setRctransactions(Set rctransactions) {
this.rctransactions = rctransactions;
}
}
ReceivingsId.java
//Composition of Id and Barcode of Receivings
public class ReceivingsId implements java.io.Serializable {
private int id;
private int barcode;
public ReceivingsId() {
}
public ReceivingsId(int id, int barcode) {
this.id = id;
this.barcode = barcode;
}
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
public int getBarcode() {
return this.barcode;
}
public void setBarcode(int barcode) {
this.barcode = barcode;
}
public boolean equals(Object other) {
if ( (this == other ) ) return true;
if ( (other == null ) ) return false;
if ( !(other instanceof ReceivingsId) ) return false;
ReceivingsId castOther = ( ReceivingsId ) other;
return (this.getId()==castOther.getId())
&& (this.getBarcode()==castOther.getBarcode());
}
public int hashCode() {
int result = 17;
result = 37 * result + this.getId();
result = 37 * result + this.getBarcode();
return result;
}
}
Rctransaction.java
public class Rctransaction implements java.io.Serializable {
private Integer id;
private Receivings receivings;
private String transaction;
private String supplierName;
private String itemName;
private double quantity;
private String paymentType;
private double amountTendred;
private double due;
private double total;
private double price;
private int recorderLevel;
public Rctransaction() {
}
public Rctransaction(Receivings receivings, String transaction, String supplierName, String itemName, double quantity, String paymentType, double amountTendred, double due, double total, double price, int recorderLevel) {
this.receivings = receivings;
this.transaction = transaction;
this.supplierName = supplierName;
this.itemName = itemName;
this.quantity = quantity;
this.paymentType = paymentType;
this.amountTendred = amountTendred;
this.due = due;
this.total = total;
this.price = price;
this.recorderLevel = recorderLevel;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public Receivings getReceivings() {
return this.receivings;
}
public void setReceivings(Receivings receivings) {
this.receivings = receivings;
}
public String getTransaction() {
return this.transaction;
}
public void setTransaction(String transaction) {
this.transaction = transaction;
}
public String getSupplierName() {
return this.supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getItemName() {
return this.itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public double getQuantity() {
return this.quantity;
}
public void setQuantity(double quantity) {
this.quantity = quantity;
}
public String getPaymentType() {
return this.paymentType;
}
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
public double getAmountTendred() {
return this.amountTendred;
}
public void setAmountTendred(double amountTendred) {
this.amountTendred = amountTendred;
}
public double getDue() {
return this.due;
}
public void setDue(double due) {
this.due = due;
}
public double getTotal() {
return this.total;
}
public void setTotal(double total) {
this.total = total;
}
public double getPrice() {
return this.price;
}
public void setPrice(double price) {
this.price = price;
}
public int getRecorderLevel() {
return this.recorderLevel;
}
public void setRecorderLevel(int recorderLevel) {
this.recorderLevel = recorderLevel;
}
}
You are instantiating the Hibernate objects in the wrong order.
First you need a ReceivingsId :
ReceivingsId rid = new ReceivingsId (id, barcode);
Then add this rid to a Receivings:
Receivings rec = new Receivings();
rec.setId(rid);
And finally set it to the Rctransaction:
Rctransaction rctransaction = new Rctransaction();
rctransaction.setReceivings(rec);
If you try to call getReceivings after instantiating the object without setting it before you'll always get a NullPointerException. To avoid this, you can instantiate the Receivings object in the Rctransaction constructor.

Parse Json with Gson in EnumClass

I have like this json.I'm using Gson to parse it and convert it in my custom class object.Here is a my java classes
public class ResponseModel {
private int resultCode;
private Match match;
public Match getMatch() {
return match;
}
public int getResultCode() {
return resultCode;
}
}
public class Match {
private Team team1;
private Team team2;
private double matchTime;
public Team getTeam1() {
return team1;
}
public Team getTeam2() {
return team2;
}
private Long matchDate;
private String stadiumAdress;
public double getMatchTime() {
return matchTime;
}
public Long getMatchDate() {
return matchDate;
}
public String getStadiumAdress() {
return stadiumAdress;
}
}
public class Team {
private String teamName;
private String teamImage;
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getTeamImage() {
return teamImage;
}
public void setTeamImage(String teamImage) {
this.teamImage = teamImage;
}
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
public int getBallPosition() {
return ballPosition;
}
public void setBallPosition(int ballPosition) {
this.ballPosition = ballPosition;
}
private int score;
private int ballPosition;
}
I'm using Gson like this
ResponseModel responseModel = GsonUtil.fromJson(response.toString(), ResponseModel.class);
public class GsonUtil {
public static <T> T fromJson(String json, Class<T> c) {
return new Gson().fromJson(json, c);
}
public static String toJson(Object c) {
return new Gson().toJson(c);
}
}
Everything working perfect,I can convert my json to custom class.But I want to use enum class with team1 and team2. My goal is to convert like this enum class
MatchTeamType:
TEAM1 (1);
TEAM2 (2);
How I can rewrite my code with enum class?
Thanks

Java serialization, android

I need to save data into object
Here is my object class where I must store data:
public static class FilterEntity implements Serializable {
public int ageFrom;
public int ageTo;
public String sex;
public String status;
public void setAgeFrom()
{
this.ageFrom = ageFrom;
}
public void setAgeTo()
{
this.ageTo = ageTo;
}
public void setSex()
{
this.sex = sex;
}
public void setStatus()
{
this.status = status;
}
public Integer getAgeFrom()
{
return ageFrom;
}
public Integer getAgeTo()
{
return ageTo;
}
public String getSex()
{
return sex;
}
public String getStatus()
{
return status;
}
}
Is it correct implementation of serialization?
In the main activity I'm saving data to FilterEntity object
private FilterEntity filter = new FilterEntity();
filter.status = valueOf(spStatusForSearch.toString());
filter.sex = valueOf(rgSex);
filter.ageTo = sbAgeHigh.getProgress();
filter.ageFrom = sbAgeLow.getProgress();
Can I do it such way?
How I can get access to data, from the third class?
don't use static
public class FilterEntity implements Serializable {
public int ageFrom;
public int ageTo;
public String sex;
public String status;
public void setAgeFrom()
{
this.ageFrom = ageFrom;
}
public void setAgeTo()
{
this.ageTo = ageTo;
}
public void setSex()
{
this.sex = sex;
}
public void setStatus()
{
this.status = status;
}
public Integer getAgeFrom()
{
return ageFrom;
}
public Integer getAgeTo()
{
return ageTo;
}
public String getSex()
{
return sex;
}
public String getStatus()
{
return status;
}
}
To set Values to Model Class
FilterEntity filter = new FilterEntity();
filter.setStatus(spStatusForSearch.toString());
filter.setSex(rgSex);
filter.setAgeTo(sbAgeHigh.getProgress());
filter.setAgeFrom(sbAgeLow.getProgress());
And to get Values
String status = filter.getStatus();
String sex = filter.getSex();
String ageTo = filter.getAgeTo();
String ageFrom = filter.getAgeFrom();
public class FilterEntity
{
public int ageFrom;
public int ageTo;
public String sex;
public String status;
public FilterEntity(int ageFrom, int ageTo, String sex,String status)
{
this.ageFrom = ageFrom;
this.ageTo = ageTo;
this.sex = sex;
this.status = status;
}
public int getAgeFrom()
{
return ageFrom;
}
public int getAgeTo()
{
return ageTo;
}
public String getSex()
{
return sex;
}
public String getStatus()
{
return status;
}
}
// in your main activity file where your are saving the data
static ArrayList<FilterEntity> data=new ArrayList<FilterEntity>();
data.add(new FilterEntity(sbAgeLow.getProgress(),sbAgeHigh.getProgress(),valueOf(rgSex),valueOf(spStatusForSearch.toString())));
// you can add multiple like this
/*Now pass this arraylist to your third activity through intent or make this arraylist static so will be able to access this arraylist anywhere through the name of the class example: MainActivity.data*/
//Now in the third activity where you want the data of the object , get the arraylist
ArrayList data=MainActivity.data;
Iterator iterotor=data.iterator();
while (iterotor.hasNext())
{
FilterEntity filterEntity=iterotor.next();
// the multiple values you add
String status = filterEntity.getStatus();
String sex = filterEntity.getSex();
int ageTo = filterEntity.getAgeTo();
int ageFrom = filterEntity.getAgeFrom();
}

Realm object not fully persisted

I'm having trouble trying to understand how realm.io persist/save objects.
I have 3 Objects (Inventory, InventoryItem and Product);
When I create a Inventory containing InventoryItems it works fine until i close the app. When i re-open the app all InventoryItems loses the reference to Product and start to show "null" instead.
Strange thing is all other attributes like Inventory reference to InventoryItem is persisted fine. Just problem with Products.
this is how i'm trying to do:
Model
Product
public class Product extends RealmObject {
#PrimaryKey
private String id;
#Required
private String description;
private int qtdUnityType1;
private int qtdUnityType2;
private int qtdUnityType3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getQtdUnityType1() {
return qtdUnityType1;
}
public void setQtdUnityType1(int qtdUnityType1) {
this.qtdUnityType1 = qtdUnityType1;
}
public int getQtdUnityType2() {
return qtdUnityType2;
}
public void setQtdUnityType2(int qtdUnityType2) {
this.qtdUnityType2 = qtdUnityType2;
}
public int getQtdUnityType3() {
return qtdUnityType3;
}
public void setQtdUnityType3(int qtdUnityType3) {
this.qtdUnityType3 = qtdUnityType3;
}
}
Inventory
public class Inventory extends RealmObject {
#PrimaryKey
private String id;
#Required
private String type;
#Required
private Date createdAt;
#Required
private String status;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
private RealmList<InventoryItem> listItems;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public RealmList<InventoryItem> getListItems() {
return listItems;
}
public void setListItems(RealmList<InventoryItem> listItems) {
this.listItems = listItems;
}
}
InventoryItem
public class InventoryItem extends RealmObject {
#PrimaryKey
private String idItem;
private Inventory inventory;
private Product product;
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
private Date expirationDate;
private int qtdUnityType1;
private int qtdUnityType2;
private int qtdUnityType3;
private int qtdDiscard;
public String getIdItem() {
return idItem;
}
public void setIdItem(String idItem) {
this.idItem = idItem;
}
public Inventory getInventory() {
return inventory;
}
public void setInventory(Inventory inventory) {
this.inventory = inventory;
}
public Date getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(Date expirationDate) {
this.expirationDate = expirationDate;
}
public int getQtdUnityType1() {
return qtdUnityType1;
}
public void setQtdUnityType1(int qtdUnityType1) {
this.qtdUnityType1 = qtdUnityType1;
}
public int getQtdUnityType2() {
return qtdUnityType2;
}
public void setQtdUnityType2(int qtdUnityType2) {
this.qtdUnityType2 = qtdUnityType2;
}
public int getQtdUnityType3() {
return qtdUnityType3;
}
public void setQtdUnityType3(int qtdUnityType3) {
this.qtdUnityType3 = qtdUnityType3;
}
public int getQtdDiscard() {
return qtdDiscard;
}
public void setQtdDiscard(int qtdDiscard) {
this.qtdDiscard = qtdDiscard;
}
}
and finally one of the millions ways i tried to persist
realm.beginTransaction();
Inventory inventory = realm.createObject(Inventory.class);
inventory.setId(id);
inventory.setCreatedAt(new DateTime().toDate());
if (radioGroup.getCheckedRadioButtonId() == R.id.rbInventario) {
inventory.setType("Inventário");
} else {
inventory.setType("Validade");
}
inventory.setStatus("Aberto");
RealmList<InventoryItem> inventoryItems = new RealmList<>();
RealmResults<Product> productsRealmResults = realm.allObjects(Product.class);
for (int i = 1; i <= productsRealmResults.size(); i++) {
InventoryItem item = realm.createObject(InventoryItem.class);
item.setIdProduct(productsRealmResults.get(i - 1).getId() + " - " + productsRealmResults.get(i - 1).getDescription());
item.setProduct(productsRealmResults.get(i - 1));
item.setIdItem(i + "-" + id);
item.setInventory(inventory);
item = realm.copyToRealmOrUpdate(item);
item = realm.copyToRealmOrUpdate(item);
inventoryItems.add(item);
}
inventory.setListItems(inventoryItems);
realm.copyToRealmOrUpdate(inventory);
realm.commitTransaction();
I already looked trough some answers here like this one:
stack answer
and the Java-examples (person, dog, cat)
provided with the API
but I can't understand how to properly insert this.
The problem is that you are setting a list of InventoryItem elements which are not added to the Realm database.
Change InventoryItem item = new InventoryItem(); to InventoryItem item = realm.createObject(InventoryItem.class);
Also, the inventoryItems themselves aren't stored in Realm db. Add realm.copyToRealmOrUpdate(inventoryItems) after the loop.

I am looking to set and an array in java while setting a sub method in the array

I have seen other array codes but here is what I got. I am trying to set the courseID in the CollegeCollege course in the array. I need to set the array in the student.java
public class CollegeCourse {
private static String courseID;
private static int creditHours;
private static char grade;
public static void setCourseID(String course){
courseID = course;
}
public static String getCourseID(){
return courseID;
}
public static void setCreditHours(int CH){
creditHours = CH;
}
public static int getCreditHours(){
return creditHours;
}
public static void setGrade(char g){
grade = g;
}
public static char getGrade(){
return grade;
}
public class Student {
private static int IDnumber;
private static CollegeCourse[] course = new CollegeCourse[5];
public static void setIDnumber(int x){
IDnumber = x;
}
public static int getIDnumber(){
return IDnumber;
}
public static String getCourse(int x){
return course[x].getCourseID();
}
public static void setCourse(CollegeCourse newCourse, int ID){
CollegeCourse.setCourseID = newCourse[ID];
}
}
It could seem like you are trying to code that the student takes course with id 5. Maybe your classes should have constructors taking arguments based on what ID the course has.
and I don't know what you need the fields to be static for, bt feel free to have them static if it is needed for some reason.
public class CollegeCourse {
private String courseID;
private int creditHours;
private char grade;
public CollegeCourse(String courseID) {
this.courseID = courseID;
}
...
public class Student {
...
private static CollegeCourse[] course = new CollegeCourse("5");
...
I think a better design would be this:
public class CollegeCourse {
private final String courseId;
private final int creditHours;
public CollegeCourse(final String courseId, int creditHours) {
this.courseId = courseId;
this.creditHours = creditHours;
}
public String getCourseId() {
return courseId;
}
public int getCreditHours() {
return creditHours;
}
#Override
public boolean equals(Object o) {
if (o == this) { return true; }
if (!(o instanceof CollegeCourse)) { return false; }
CollegeCourse cc = (CollegeCourse)o;
return courseId.equals(cc.courseId)
&& creditHours == cc.creditHours;
}
#Override
public int hashCode() {
int result = 17;
result = 31 * result + courseId.hashCode();
result = 31 * result + creditHours;
return result;
}
};
public enum Grade { A, B, C, D, E };
public class Student {
private final String id;
private final Map<CollegeCourse, Grade> course2GradeMap = new HashMap<>();
public Student(final String id) {
this.id = id;
}
public Grade getGrade(final CollegeCourse course) {
return couse2GradeMap.get(course);
}
public void addCollegeCourse(final CollegeCourse course, Grade grade) {
course2GradeMap.put(course, grade);
}
public Collection<CollegeCourse> getCollegeCourses() {
return Collections.unmodifiableCollection(course2GradeMap.values());
}
};
Use it in this way:
Student student = new Student("001");
student.addCollegeCourse(new CollegeCourse('alg', 100), Grade.A);
student.addCollegeCourse(new CollegeCourse('stat', 100), Grade.C);

Categories

Resources