packages and interfaces
In our project we have made four packages for each modules:-
|
|
We have also made an interface, Displayi which has display function. This interface is implemented by 2 classes, Cdisplay and Mdisplay which displays the details of customer and mobile resp.
exception handling
In our project, we have also done exception handling. To catch the exception we have made a user defined exception, Myexception, which is thrown using throw keyword in different classes, wherever needed.
polymorphismIn our project, concept of polymorphism is shown in read(), add(), delete() and update() method. These methods are defined in different classes with same name. Like, update method is defined in CustomerAdministration class and also in its sub class Bill and MobileAdministration. Thus, this update method is overridden in the sub classes. |
inheritanceIn OOP, we often organize classes in hierarchy to avoid duplication and reduce redundancy. Inheritance uses the concept of method overriding. Inheritance is an example of 'Is-A' relationship
.In our project, we are using multi-level inheritance. Here, Login class extends the choice class. Generate bill class of bill class extends the display class which is used to display mobile avaliable in the store with its details and also update the bill and mobile file.. And depending upon the bill, we calculate the sales of the store, thus, Sales class also depend on the Bill class. |