This is another lab task to be completed before we finish up with selection.
After practicing all the selection problems done so far, i hope u’ll be able to complete this assignment.
This contains tasks related to loops.
This file contains a single task only, which is very easier but improves your capability to understand the problem statement.
This covers all the selection ways, attempting all of them will help a lot to code difficult problems.
Download Here: Hotel Management
Author: HAMZA AMIN
Roll No: 018-BSCS-13
This program bokks rooms in the hotel. There is a main class named UseHotel which has following main options.
- Payment Section
- Show rooms
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 their 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. Show rooms will tell you about the number of rooms booked. 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
- Download here: Person Information
- Author: Sawail Khan
Data of Students and Teacher
This program is designed for storing the data of Students and Teachers it can used in many institutions for storing the information, it contains the following classes:
- Contact Info.
There is the project diagram of this project
- Download Here: Bank Accounts
- Author: Azeem Malik
Submitted to: Sir Imran Rafique
Submitted by: Azeem Nabi Malik
Roll No: 354-BSCS-2013
I made this project using the concepts of a bank .
Following classes are involved in this assignment.
- Current Account
- Savings Account
Class Account :
It is the parent class of Current Account and Savings Account. It consists of data members amount, accNo ,inputBalance, outputBalance. Its Constructor initializes the the amount and account number of the user.
getAmmount() returns the amount and getAccNo(); returns the account number.
Class Current Account :
Current Account extends Account.
Contains a data member of tax and initializes it in its constructor.
It contains the following methods
taxDeduction deducts the tax as per the bank policy of the percentage of tax on the current account .
inputAmmount enters the amount into the bank account .
drawAmmount draws the desired amount from the account
Class Fixed Account:
It extends Account and and has two new data members noOfMonths and interest . It initializes the number of months and the percentage of interest on the number of months for which the account has been fixed . The interest is calculated in the constructor.
inputAmmount enters the amount into the fixed account .
drawAmmount draws the desired amount from the account .
This class runs the program using the previous classes. It consists of the main method. It shows a menu from which you can select weather to create a fixed account or a current account or Draw money from a fixed or current account.
It asks the account number and the amount to enter in the account and returns the amount.
- Project Diagram
- Download here: University Record
- Author: Fahad Ali
Project : Access to university records.
Submitted to : Sir Imran Rafique
Submitted by: Fahad Ali
Roll number: 351–BSCS-2013
Section : C
This project is about the system of the university. It deals with the records of the university that if the university have to enroll a student or to hire a teacher then it should be added to the records of the university. This project keeps the record of all students and assigns a roll number to all students so they can be accessed by their rolll number afterwards.
There are total four classes as following:
In this class there is a mutator that sets the post in the university and a method displaypost that displays the post in the university. In this class mechanism of inheritance is used so that the child classes (students and teachers) can access the methods of this class.
In this class information of students is gathered and then displayed by the method named display and it can access the setpost method of the class named UniversityMembers as it is its child class.
in this class information is gathered of the teachers to be hired for the university like name, experience,qualifications and all the names of the teachers are stored in an array named teachers to be accessed afterwards. This class can also access the methods used in the parent class UniversityMembers.
In this class objects of all classes have been created two hasmaps are created in which the forst one have integer as key and value as the whole class students , this will keep the all record of students and assign them a roll number and the second hasmap is used to store the whole class teachers and assign a number for them for the record. When this class will run it will show a menu which actually access the other classes and we can store values in other classes by this class.
Directly from the class AccessRecordOfUniversity we create an object or run through main a menu will be shown in which we have to choose an option and give the required information whether to enter the post in the university or to enroll a student or to hire a teacher. After giving the information it will be stored for to access it afterwards.
This project is about the university records and from only one class AccessRecordOfUniversity we can access all other classes and store values in the methods of all other classes.
Download Here: Student Data
Author: Tabinda Shahid
Submitted to: Sir Imran Rafique
Submitted by: Tabinda Shahid
Roll No: 345-BSCS-2013
Registration System for Teacher & Students
I made this project using the concepts of Registration system.
Following classes are involved in this assignment.
Abstract class Person:-
This class is made for the purpose to be extended or inherited. All the other will extend this class to use its functionality. This class contains four protected variables.
- Ø name : String
- Ø email : String
- Ø bloodgroup : String
- Ø e : lifeevent
- Ø p : Person
These are protected variables and can be used directly by the other classes that extend Person class.But person class just using LifeEvent class and LifeEvent is separate class which is not extend person class.
- Ø getName : String
- Ø getEmail : String
- Ø getBloodgroup : String
- Ø getEvent : LifeEvent
- Ø abstract printDetail() : void
All the methods are accessors(getters) and mutators(setters) for the fields except abstract method.
This class extends Abstract class person. This class has an extra field called private float pay that is used to get pay of teacher person. And also class has an extra field called private float id that is used to get id of teacher person. Also includes getters and setters for this field. This class implements the abstract methods printDetail() and withdraw methods of the super class. There is a constructor public Teacher(String email, String name, String blood ,float balance, int id ) that give the detail of teacher.
This class extends Abstract class person. This class has an extra field called private float roll that is used to get pay of teacher person. And also class has an extra field called private float gpa that is used to get roll number & gpa of students. Also includes getters and setters for this field. This class implements the abstract methods printDetail() and withdraw methods of the super class. There is a constructor public Student(String email, String name, String blood ,float gpa, int id ) that give the detail of student.
This class is related to the person’s event with date. This class has an field called private String date that is used to get date of event and also class has an field called private String event that is used for person event detail. Also includes getters and setters for this field. This class is used for enter event detail about person teacher or students. It is having one input method.
This class uses the other classes to interact with the user. This class has only two public and five private member functions.
- Ø Public Static main() : Our program starts here
In which main() & start() method called.
- Ø Public Main() : Having arrayList of person Type
- Ø Public start () : void
- Ø public start() : void
- Ø private register() : void
- Ø private menu() : String
- Ø private print() : void
- Ø private addLifeEvent() : void