Library Management System

Overall Description

Scope:

This system will be able to issue books to its members (faculty and students ). There are different classes and have different functionalities. This project or user based program is used by Librarian of the library.

Objective:

Through this system you can issue a book to member to its limited range, store/retrieve the record of member, store information about book and also retrieve the information and also make transaction/fine of the member. All this procedure is handled by the librarian class.

Hierarchy design:

Class design:

There are following classes and sub classes in the project:

  1. Book
  2. MemberRecord
  • Faculty
  • Student
  1. Transaction
  2. Librarian
  3. Bill
  4. File system
  5. login

Explanation:

  • Book:

In class book all the info about the book (author name ,rack no etc) will be stored.

  • Member Record:

Record of both members faculty and students can be saved and retrieve. Sub classes of member record have some unique methods to avoid the duplication of data.

  • Librarian:

Librarian will get the record of member , issued the book and make transaction.

  • Bill:

In bill class fine of member is calculated by using simple geeter and setter method.

  • File system:

File System is a background class , which is being used to store data of transactions to a text file. It has all the functions to read and write data of the above classes to different files. It uses bufferreader and file stream to read and write data.

  • Login:

Login class is consist of general concepts of GUI. If we want to work in GUI we start coding by login class.

Limitations :

This project is working correctly but has no complete menu to use . Because GUI is not being used but only a general concept of login class.
Download here

Employee Salary Calculator

Author : Malik Nabeel
Roll No : 35-CS-13
Employee Salary Calculator

In this project, we are going to calculate the income of an employee. When we hire employee in our company, we hired them on different basis and according to their capabilities, we set their income.

In this Project, different concepts of Object Oriented Programming is used like Polymorphism, Inheritance, Abstract Class, Array list, Scanner, Making Objects in main class, Program starts in main class, Switch statement, Do-While loop, for-each loop etc.

Employees are of different types. Following are the Employees which I discussed in the project.

  • Monthly Basis Employee
  • Monthly + Commission Basis Employees
  • Employees only on Commission Basis

Class Design

  • Employee (Abstract Class)
    • Monthly Salary
    • Commission With Salary
    • Commissions
  • Dynamic (Main Class)

Explanation about Classes

Class Employee is an abstract class in which the method of income is abstract. It provides methods income and toString, in addition to the get and set methods that manipulate Employee’s instance variables. An income method certainly applies generically to all employees. But each income calculation depends on the employee’s class. So we declare income as abstract in superclass Employee because a default implementation does not make sense for that method.

Class Monthly Salary extends class Employee and overrides income which makes Monthly Salary a concrete class. The class includes a constructor that takes a name, a post, CNIC and a monthly salary as arguments; a set method to assign a new non negative value to instance variable monthly Salary, a get method to return monthly Salary’s value, a method income to calculate a Monthly Salary income; and a method toString, which returns a String including the employee’s type, namely, “salaried employee: “.

 

Class Commission extends class Employee and overrides income. The class includes a constructor that takes a name, a post, CNIC, sales and commission rate as arguments; a set method to assign a new non negative value to instance variable sales, commission Percentage, a get method to return commission Percentage’s value, a method income to calculate a income without Salary base on commission; and a method toString, which returns a String including the employee’s type, namely, “Employee on Commission Basis: “.

Class Commission with Basic salary extends class Monthly Salary and overrides income. The class includes a constructor that takes a name, a post, CNIC, sales, Salary and commission rate as arguments; a set method to assign a new non negative value to instance variable sales, commission Percentage, Salary ,a get method to return commission Percentage’s value with Salary, a method income to calculate a income with Salary base on commission; and a method toString , which returns a String including the employee’s type, namely, “Employee on Salary Basis with Commission: “.

Class Dynamic is a main Static class and gives output income. The class includes Objects of the Employee Subclasses and use Array list and scanner to save and taking input of employees. Calculate the income. For Each loop is used in this to print the Income of the Employee, and also show that whether which of the sub class belongs to. Its takes input from the user and gives the required Output.

Download from here

Hotel Reservation

Download Here: Hotel Reservation

Author: Shaheer-ul-islam

Hotel Reservation

Introduction

This program is used in terms that how to use a Hotel Menu for the booking of rooms. Firstly there is a main menu in which there are three options in which you will get the types of rooms and how to book the required room and how to quit from the main menu. Further if you want to know about the rooms, select the room option. By pressing the rooms button, three types of rooms will appear along with their characteristics and for the booking of room you can go back to the main menu and choose the payment method. In the Payment method, there are three types of rooms along with  there charges and their names. And if you want to book any of the room, all you have to do is to select the room you want to boo and then there will be a message for you to enter the required charges for the required room.

Diagram

And when you will enter the exact charges there will be a message for you that your room is booked and if you enter less than or greater than the required room rent there will be a message “Invalid Amount” and the program will automatically go the main menu. And if you want to exit from the main menu you can easily move out by entering the exit Button.

 

Ticket Reservation

Download Here: Ticket Reservation

Author: Mian Shakib Umer

Ticket Reservation

Technical Article:

Buy your tickets from Lahore train station. In this task we talk about a problem that pops up once in a while, a seat reservation system. People have their preferences and the Lahore train is no different. Some people like the windows, some people like the aisle seats. We talk about how to setup a basic system for reserving window and aisle seats and knowing when a seat type is available. We do all this in a simple little Java program.

There are many methods to solving this problem and this is one example of it. At the heart of it is two simple methods that loop through an array of seats. These two functions check a certain number of array subscripts to see if any spots are available, and if there is, it marks it as taken. One function takes the first half of the array and the second function takes the second half of the array. These functions then return a seat number if one has been booked or a -1 if the seat type is taken.

The first step we do is import a scanner class for taking in some input and another for using the Date in our print Pass function. We then start our class with a private static array called “seats” which holds both our window and aisle seat assignments. In the main function we then initialize these seats to a value of 0, meaning that they are empty. Whenever we want to book a seat, we will put the value 1 in that spot of the array. You could use letters or other numbers or whatever. You could even keep the array null and only put numbers in it to mark them as taken. As long as you can check them later to see if they have been marked as taken already or not.

We continue by prompting the user for a choice. 1 if they have a window preference, 2 if they have an aisle preference or 0 to exit. We use this choice to determine how we go about booking a seat. This choice and booking mechanism is in a while loop that will continue until they type 0.

If the user chose a window seat preference, we call our bookWindow() function to see if we get a seat assignment or -1 indicating that no window seats are available. If there was a seat, we go and print out a boarding pass by calling printBoardingPass(). If there were no seats, we attempt to book them an aisle seat and let them know a window seat was not available.

We do a similar procedure for if they chose an aisle seat. If none are available, we attempt to book them a window seat. In either case we print out a boarding pass for them.

Diagram

Both of these functions are very similar. They loop through looking for a empty spot in the array (one marked as zero) and if it finds one, it changes it to 1 and returns the seatnumber (remember to add one to the index since the index starts at 0 in the array and array item 0 is seat number 1). If for some reason we were not able to find a window or an aisle seat (despite which choice they made to begin with) then seatnumber will be -1. We can then inform them that no window or aisle seats are available. They can then exit the program at that time.

Thanks for reading!

 

Club Membership

Download Here: Club Membership

Author: Aniqa Iftikhar

 Club Membership

Introduction: This project is on the club membership in which members are  added every year and month. Club class is a parent class which has three fields (name, month, year) to enter the record of members .Membership class is inherit to Club. In RegistrarOffice  iterator is being  used . In ArrayList Club type is used.In this class methods are used to add and return the size of members. Iterator is used to return the total number of member enter in the “joinInMonth”.

Diagram

In main class “Menu” involve import of the Scanner. In this class the static main is used having four options. First option is used to enter the data of the members register in the club. In second and third option is used to return the number of members registered in the given year and month. Last forth option returns the registered members. By pressing ‘0’ the program is exit. This program has one entry and one point.

Merit List

Download Here: Merit List

Author: Salman Younas

Merit List

Introduction

This project is for calculate merit list. With the help of this project you can generate the merit list of bscs students whose admission depends upon percentage marks of the student fsc marks(weightage  50%)and entry test marks(weightage  50%) as well as you can also calculate merit list of mathematic students whose admission depends upon percentage marks of the student fsc marks (weightage  50%) and mathematics marks (weightage  50%).

This program show you the total number of student enrolled as well as it will also show you number of student having marks greater than the specific merit. It will also print you the names and form number of students having marks greater than the specific merit that you set.

This program have only one main method  throw which it is excuted its mean it have only one entry point and also have only one exit point.

Class Student

It is abstract class and it have only two methods called name and fathername this methods is also abstract because it is in the abstract class. This methods is present in this class because every student should have name and father name.

Class GCUStudent

This class is inherited by abstract class named as Student class. This class initialized the name, formno, andfsc marks of the students. As it is extends by Student class so it is necessary to use those method that are present in abstract calss called Student class.

Class BSCS_Student

This class is inherited by GCUStudent class. It takes information of bscs student. As bscs merit list is determine on the basis of fscmarks and entry test marks so it takes entry test marks and all other  parameter like name,formno and fsc marks etc are given to the parent class by super method as it is inherited by GCUStudent class.

Class Math_student

This class is inherited by GCUStudent class. It takes information of mathematics student. As mathematic merit list is determine on the basis of fscmarks and matric marks so it takes matric marks and all other  parameter like name,formno and fsc marks etc are given to the parent class by super method as it is inherited by GCUStudent class.

Important information

In parent class we have method matricmakks and test marks. These method are also present in the child classes in this why we use child method with the help of parent class object in this why we can override the method and we can use the polymorphic behavior which are  the property of inheritance.

Class Merit

This class calculate the merit list.In this class you can add student and you can  check total number of  student enrolled in admission. This class also give you number of student greater than the specific merit that you set. This class also print  you the merit list in which the names and form no of those those student which have greater marks than specific merit that you entered.

Important information

In this class I use a method called displaymerit In this method we use for loop whose type is GCUStudent because we use arraylist of type GCUStudent and we check the coming object wheather it is BSCS_Student type or Math_Student type by using instanceof built in method and we use if else condition for this. After verifying the coming object we explicitly assign its type and use the method  of that particular object to disply merit list.

Diagram

Class Meritlistgenerator

This class have only one main static method throw which all the project executed.in this we take input by the user and these input are passed in the anonymous object. in this why the merit list created………

 

Server System

Download Here:Server System

Author: Momna Dar

 Server System

Introduction: This project is based on the server’s capacity and limits of client.In this project the server  class is the parent class, which is further inherited by two classes MainFrame and SuperComputer.In Server class constructor is not parameterized, an else than that accessor and mutator method are given used to get and set the value respectively and further more there is diplayInformation method. MainFrame is a server that has null constructor the same qualities that of the Server.It has a method(displayInformation) that override the parent class method.In the same way Supercomputer class the same method is override from the parent class.

Diagram

In the main class named ServerOperater import by Scanner.There are five options in ServerOperator.First option is used to take the input from user to store the information for the MainFrame and the same behaviour is perform for the supercomputer. The forth option is used to display the information enter by the user and fifth is used to exit the program.There is only one entry an exit point.

 

Bank Project

Download Here: Bank Project

Author: Muhammad Awais (0090-BSCS-2013)

Bank Project

This is a project about the Bank in which we can use it in two different ways. First is use as a client and second is to use as a manager. A client use only specific mean limited access like he can only create an account and can access the ATM and complain to the manager about the Bank and others.  And the second is to use as a Manager in which manager can access all the method which are in the Bank class like he can also create an account and use atm and the method which a manager can do like search an account from the bank software and manager can check the total amount of the all accounts and see the complain if any and the main thing is the name and the password for the manager to access if the name and the password is write then you can access. Main difference in manager and client is that a user name and a password which is entered only by the manager. USE class is the main class an object of the bank is created in the USE and in the Manager and client class. Its mean that a client can access the method of the bank butt in this project client can only have the limited access and the manager can access all the method from the bank and client can complain to the manager if he wants and manager can see the complains.

 

Class Bank:

It the class in which almost complete program is written and the client and the manager access a client can access the limited methods and the manager can have the all access it can see the all account and manager can check the total sum of the amount of all the accounts. A object of the manager is created in the bank for the client if a client want to complain to the manager.

Methods in the Bank class are as follow:-

1. Main ():-

It is the main method which is static it is accessing all the methods like Display All_Account () and the others.

2. Total Amount ():-

It is the method write to display all the sum of the accounts and it is only accessing by the manager.

3. Display All Account ():-

It is the method which is used to see all the accounts which are in the bank and it is only also access by the manager.

4. Create Account ():-

It the method which is used to create an account in the bank and in this method we use ArrayList to store the data. After completing the process to creating an account this method will automatically show all the information for the client to see his/her data is. It is accessing by both class client and the manager.

5. ATM ():-

It the method which is used to take some cash from the bank in this process user enter his account no. if it is write then the system show his/her name and after this it will ask for the password if the both are write then you are able to take some cash from the bank. It is also used by the both classes client and the manager class.

 

 USE Class:-

It is the main class to run the program in a sequence. In USE class we create only one object which is bank object. With the help of the bank object we use and access all the method in the USE class.

Manager Class:-

It is the class which is used only by the Manager if a person knew the user name and password of the Manager then it can access the manager class there are some extra method in the class like manager page () which is used to complain the manager and other which every one can’t access it is only access by the manager. And the other methods are in the bank class which is also not openly used for everyone.

Project Diagram

Client Class:-

      It is the class which have limited access it is used to write for the client use and client can only have the three function to access and use like Create Account and the second is use ATM  and the client can only complain to the manager about anything related to bank.

Mobile System

Download Here: Mobile System

Author: Yumna Nadeem

Mobile System

Introduction:

This system can maintain the list of classified collections of mobiles by displaying list of mobiles by basic categories and addition to the list, all the data entered in the running system only stores in the memory and available accordingly with the program state.

Basic specification is an interface contains all the basic functions definition inherited in Mobile (Main class). Mobiles are the main/base class contains implementation of interface; this class is also used as to create collection of input data. Simple Mobile Phone is one of the child class inherited with Mobiles class and use Mobiles instances to create simple mobile  phone collections also have overloaded function implementation. Smart Mobile phone is one of the child class inherited with Mobiles class and use Mobiles instances to create smart mobile phone collections also have overloaded function implementation.

Process Mobile is the execution class contains main function which creates and manage menu to operate the system. In this menu, the three options are given where the user will select an option of his own choice whether to select Smartphone, simple phone or exit the program. By clicking the simple phone menu u will be capable of entering the mobile list that is to be ordered by the user at the time of execution and same with the Smartphone menu to enter in to the program to get listed all of your details about the mobile phone that you need. If you want to exit at that time, an exit button is also there to exit whenever you want.  All the specifications of the mobile phones are first added to the option that is related to it that will ask the Mobile Name, Brand, IME, Height (cm) Width (cm), Weight (grams). In this way the data will be added successfully, you can list to get all mobiles available in the list to get listed in the given menu. After adding your required mobile, you will be able to get to know that what the list of the given mobile is. That is supported by the second menu that is to list all mobiles. The third option is also available for the user to return to the back menu to return to main menu from where he can exit the program easily.

Project diagram

Person Registration

Download Here: Person Registration

Author: Muhammad Hamza Javeed

Person Registration

General Information:

This is a general abstract program that has the ability to take the required inputs regarding a person’s identity, store them, and print them on the screen if the user demands.

Classes:

This project consists of 4 classes, name as:

1-Person

2-Student

3-Teacher

4-Main class

Person Class:

This is an abstract class. it has 3 protected data members , i.e. name , email , and bloodGroup , which are in common in the both child classes (Student , Teacher ) . It has an abstract function called printDetail();

Teacher class:

This class extends Person Class, i.e. it is the child class of person class. Apart from the inherited data members of the parent class, it has two of its own, i,e, pay , and id . it has a printDetail() function which overrides the function of the parent class .

Student class:

This class extends the parent class i.e.it is the child class of person class. Apart from the inherited data members of the parent class, two more data members have been declared in this class named as roll, and GPA. It also has the overriding function printDetail().

Diagram

Main Class:

This has the basic check marks and it takes the input from the user whether he or she wants to register a person or print the details of the already registered person. If the user selects “register a person” it takes the user to a menu where the user is asked a few inputs and then asked that he wants to register the person as teacher on student. Once the person is registered the user is taken back to the main menu again. if the user selects “print the information “ then all the info regarding the registered person are shown on the screen .