#include <iostream>
#include "NoClasses.cpp"
#include "NoStudents.cpp"

using namespace std;

int main(){

	int students, classes;
	double spc; //students per class

	cout <<"give number of students"<<endl;
	cin>> students;
	cout <<"give number of classes"<<endl;
	cin>> classes;



try{
	if (classes<=0) throw NoClasses(students);
	if (students<=0) throw NoStudents(classes);

	
	spc=students/(1.0*classes);

	cout << students <<"Students" <<endl <<classes <<" classes" << endl << "Average of studnets per class:" <<spc <<endl;

}

	
catch (NoClasses exc){
	cout << exc.getCount() <<"students, and no valid classes" <<endl <<"Number of classes must be positive. Aborting" <<endl;

}
catch (NoStudents exc){
	cout<< exc.getCount() <<"Classes, and no valid students"<<endl<<"Number of students must be positive, Aborting" <<endl;
}



return 0;

}
