3) Write a test class in which you create a Student instance and then add to it some Receivable objects. Use the following data (left figure) and produce output as in the following figure (right).
Test Data:
Student: { name=Khalid Hussein, id=1045}
Type Description Semester Other data
Fee Admission fees Fall2013 creditHours=0; rate=0
Books Textbooks Fall2013 numberOfBooks=5
Fee Tuition fees Fall2013 creditHours=15; rate=600
Books Textbooks Spring2014 numberOfBooks=6
Service Swimming pool - Cost=200
Service Buss service - Cost=1000
Output:
Student:Khalid Hussein
Admission fees Fall 2013 200.00
Text Books Fall 2013 250.00
Tuition fees Fall 2013 9000.00
Books Spring 2014 300.00
Swimming Pool 180.00
Buss service 900.00
Received Total = 10830.0
Comments
Leave a comment