// declaration of varibles.
private boolean mTechFee;
public OnlineStudent(String pId, String pFname, String pLname) {
super(pId, pFname, pLname);
}
/**
* Accessor that returns mTechFee boolean
*/
public boolean getTechFee() {
return mTechFee;
}
/**
* Mutator for setting mTechFee boolean
*/
public void setTechFee(boolean TechFee) {
this.mTechFee = TechFee;
}
//Overridden calcTuition method - calculates tuition of OnlineStudends based on
TuitionConstants
@Override
public void calcTuition() {
double t = getCredits() * TuitionConstants.ONLINE_CREDIT_RATE;
if(getTechFee() == true) {
t = t + TuitionConstants.ONLINE_TECH_FEE;
}
setTuition(t);
return;
}
}
Powered by TCPDF (www.tcpdf.org)
public class OnlineStudent extends Student{
//**********************************************************************
//**********************************
// CLASS: OnlineStudent(OnlineStudent.java)
//
// DESCRIPTION
// The logistics of finances if one is an on-line student.
//
// COURSE AND PROJECT INFO
// CSE205 Object Oriented Programming and Data Structures, Summer-B 2019
// Project Number: 2
//
// AUTHOR
// Abderrazak Raouah
//
//**********************************************************************
//**********************************