MODULES
1. Login
It asks the user to access the system by entering the user name with the user password
2. Mobile_Phone_Administration
It provides the user to maintain the Mobile Phone Details Like
3. Customer_Administration
It provides the user to maintain the Customer Details Like
4. Bill_Administration
It provides the user to maintain the Bill Details Like
It provides the user to maintain the Sales Report Details Like
It asks the user to access the system by entering the user name with the user password
2. Mobile_Phone_Administration
It provides the user to maintain the Mobile Phone Details Like
- Add a new Mobile Phone
- Search for a Mobile Phone
- Update a Mobile Phone Details
- Delete a Mobile Phone
3. Customer_Administration
It provides the user to maintain the Customer Details Like
- Add a New Customer
- Search for a Customer
- Update a Customer Details
- Delete a Customer
4. Bill_Administration
It provides the user to maintain the Bill Details Like
- Generate a Bill
- Search for a Bill
It provides the user to maintain the Sales Report Details Like
- yearly Reports
- Monthly Reports
CLASSES
The class is at the core of Java. It is the logical construct upon which the entire Java language is built because it defines the shape and nature of an object. Any concept you wish to implement in a Java program must be encapsulated within a class. The data, or variables, defined within a class are called instance variables. The code is contained within methods. Collectively, the methods and variables defined within a class are called members of the class. In most classes, the instance variables are acted upon and accessed by the methods defined for that class.
IN our project we have defined 5 classes namely Login, Customer Administration , Mobile Phone Administration, Bill and Sales.
IN our project we have defined 5 classes namely Login, Customer Administration , Mobile Phone Administration, Bill and Sales.
- Login class stores the information of User Id and password which enable the admin to sign in into the system.
- Customer Administration stores the information of customer like his/her name, address, gender , mobile number and the model specifications of the mobile purchased.
- Mobile Administration stores the information of the mobile like PhoneId , Mobile name , Mobile model and colour.
- Bills stores the information of bill details like customerId , mobileId, and original price , disscounted price and so on
- Sales contains the net distributed mobiles within a week , or a month.
NESTED & INNER CLASSES
It is possible to define a class within another class; such classes are known as nested classes. The scope of a nested class is bounded by the scope of its enclosing class. Thus, if class B is defined within class A, then B is known to A, but not outside of A. A nested class has access to the members, including private members, of the class in which it is nested. However, the enclosing class does not have access to the members of the nested class.
There are two types of nested classes: static and non-static. A static nested class is one which has the static modifier applied. Because it is static, it must access the members of its enclosing class through an object. That is, it cannot refer to members of its enclosing class directly. Because of this restriction, static nested classes are seldom used.
The most important type of nested class is the inner class. An inner class is a non-static nested class. It has access to all of the variables and methods of its outer class and may refer to them directly in the same way that other non-static members of the outer class do. Thus, an inner class is fully within the scope of its enclosing class.
There are two types of nested classes: static and non-static. A static nested class is one which has the static modifier applied. Because it is static, it must access the members of its enclosing class through an object. That is, it cannot refer to members of its enclosing class directly. Because of this restriction, static nested classes are seldom used.
The most important type of nested class is the inner class. An inner class is a non-static nested class. It has access to all of the variables and methods of its outer class and may refer to them directly in the same way that other non-static members of the outer class do. Thus, an inner class is fully within the scope of its enclosing class.
Some of the nested classes used in this project are:-
This nested class are made under read() method of mobileAdministration class and customerAdministration class.
- nokiamobiles()
- samsungmobiles()
- micromaxmobiles()
- htcmobiles().
This nested class are made under read() method of mobileAdministration class and customerAdministration class.
ABSTRACT CLASSES
There are situations in which you will want to define a super class that declares the structure of a given abstraction without providing a complete implementation of every method. That is, sometimes you will want to create a super class that only defines a generalized form that will be shared by all of its sub classes, leaving it to each subclass to fill in the details. Such a class determines the nature of the methods that the sub classes
must implement.It has a "has-a" relationship.
must implement.It has a "has-a" relationship.
The output of the given program is:- 4 2 This program has abstract class called Myclass which contains an abstract method calculate. In this class only the method is defined. Its implementation is not given in this class. Implementation of calculate is given in sub classes Sub1 and Sub2. This method has different method in both the classes. In Sub1, it calculates the square of the given number while in Sub2, it finds the square root. Due its different implementation, this method is an abstract method and thus defined in abstract class. |
If a class is abstract,then that class have or can not have abstract methods.but if a method is abstract then its class must be abstract. Abstract method
You can require that certain methods be overridden by sub classes by specifying the abstract type modifier. These methods are sometimes referred to as sub classes responsibility because they have no implementation specified in the super class. Thus, a sub class must override them—it cannot simply use the version defined in the super class.
In this project there is one abstract class:-
You can require that certain methods be overridden by sub classes by specifying the abstract type modifier. These methods are sometimes referred to as sub classes responsibility because they have no implementation specified in the super class. Thus, a sub class must override them—it cannot simply use the version defined in the super class.
In this project there is one abstract class:-
- abstract class action()
INTERFACES
Using the keyword interface, you can fully abstract a class' interface from its implementation. That is, using interface, you can specify what a class must do, but not how it does it. Interfaces are syntactically similar to classes, but they lack instance variables, and their methods are declared without any body. In practice, this means that you can define interfaces which don't make assumptions about how they are implemented.
This program is an example of interface. The output of this program is:- hello In this, A is an interface. Thus, the methods defined in A are abstract and public by default. Since m1 is an abstract method, therefore, only its definition is given in A. The implementation of m1 is given in the class B, which implements the interface A. |
Like abstract classes in interface we again declare the prototype of the method and define its implementation in some other class. Interface has purely abstract methods.In java we can achieve multiple inheritance using Interface. To implement interface we use 'implement' keyword
Interface can not be instantiated , that is, we cannot create object, only references can be created.
Interface can not be instantiated , that is, we cannot create object, only references can be created.