why do i keep getting this error that says theres not appropriate default constructor for the LabCourse?
Code:
#include<iostream.h>
#include<string.h>
class CollegeCourse
{
protected:
char department[3];
int courseNumber;
int creditHours;
double tuition;
public:
CollegeCourse(const char dept[],const int course,const int hours,const double tuit);
void showCollegeCourse();
};
class LabCourse:public CollegeCourse
{
private:
double fee;
public:
LabCourse(const char dept[], const int course, const int hours, const double tuit);
void showLabCourse();
};
CollegeCourse::CollegeCourse(const char dept[],const int course,const int hours,const double tuit)
{
strcpy(department, dept);
courseNumber=course;
creditHours=hours;
tuition=tuit;
};
LabCourse::LabCourse(const char dept[], const int course, const int hours, const double tuit)
{
strcpy(department, dept);
courseNumber=course;
creditHours=hours;
tuition=tuit;
fee=10.25;
};
void CollegeCourse::showCollegeCourse()
{
cout<<department<<courseNumber<<" "<<creditHours<<" credits. Tuition $"<<tuition<<endl;
}
void LabCourse::showLabCourse()
{
cout<<department<<courseNumber<<" "<<creditHours<<" credits. Tuition $"<<tuition<<endl;
cout<<"Plus a lab fee of $"<<fee<<endl;
}
void main()
{
CollegeCourse cc("ENG",121,3,333.33);
LabCourse lc("CIS",250,4,444.44);
cc.showCollegeCourse();
lc.showLabCourse();
}