You are on page 1of 30

PROJECT BASED LAB REPORT

On

Marriage Bureau management


Submitted in partial fulfillment of the

Requirements for the award of the Degree of

Bachelor of Technology
In
COMPUTER SCIENCE ENGINEERING
By
S.V.Rohith-150031000 section-03
A.Akhila-150030024 batch-27

K L University
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
K L University
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

This is to certify that the course based project titled “Marriage


Bureau management”, being submitted by S.V.Rohith-150031000, A.Akhila-
150030024 in partial fulfillment for the award of degree of Bachelor of
Technology in Computer Science Engineering is a record of bonafide work carried
out by them under my guidance during the academic year 2016 and it has been
found worthy of acceptance according to the requirements of the university.

Project Guide

Dr. G.Krishna Mohan


TABLE OF CONTENTS

1 Introduction
1.1 What is Marriage Bureau
1.2 Problem Definition
1.3 Platform requirements
1.4 Software Requirements Specification
2 Analysis & Design
2.1 Analysis classes
2.2 Program Architectural Design
2.3 File Design
2.4 Input Design
2.5 Output Design
3 Source Code of the project
4 Results
5 Conclusion and Future Scope
6 Bibliography
ACKNOWLEDGMENTS

The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless cooperation made it possible,
whose constant guidance and encouragement crown all efforts with success.

We are grateful to our project based Lab guide Dr.G Swain Professor, Computer
Science & Engineering for the guidance, inspiration and constructive suggestions that helped us
in the completion of this project.

We thank all our friends who helped us in sharing knowledge with us


Definition:-

The Marriage Bureau system is meant for maintaining information of bride and
bridegrooms. It makes a matching between brides and bridegrooms depending on
their requirements. Enquiry facility is provided where ever required.

Platform minimum requirements

Hardware/
Hardware / Software element Specification /version
Software

Hardware Processor Intel core to duo

RAM 1 GB

Hard Disk 100 GB

Software OS Windows XP

Java and Net beans IDE


2. Analysis & Design
2.1 Analysis classes

The software requirements specifications are analyzed and the


following classes are identified
Class Bride
intbrideId;
String brideName;
String brideAddress;
intbrideMobileNo;
intbrideAge;
intbrideHeight;
intbrideWeight;
String brideQualification;
String brideJobPosition;
intrbgminheight;
intrbgmaxheight;
intrbgminweight;
intrbgmaxweight;
String rbgJobPosition;
intrbgminsalary;
intrbgmaxsalary;
void displayRecord();
Class BrideGroom
intbgId;
String bgName;
String bgAddress;
intbgMobileNo;
intbgAge;
intbgHeight;
intbgWeight;
String bgQualification;
String bgJobPosition;
intrbdminheight;
intrbdmaxheight;
intrbdminweight;
intrbdmaxweight;
String rbdJobPosition;
intrbdminsalary;
intrbdmaxsalary;
void displayRecord();

2.2 Program Architectural Design


Various Modules of Marriage Bureau system are identified and are shown
below
Serial Number Name of the Module
1. Management of Brides information
2. Management of Bridegrooms information
3. Matching
4. Main module
Various functions in each module are identified and are shown below.

Function Identification - module wise


Module Function
Module Name Function Title
Number Serial
Management of 1. To create brides information file
Brides information 2. To update brides information file
1. 3. To search brides information file
4. To generate Reports
2. Management of 1. To create bridegroom information file
Bridegroom 2. To update bridegroom information file
information 3. To search bridegroom information file
4. To generate Reports
3. Matching 1. To make matching
2. To intimate to bride
3. To intimate to bridegroom
4. To enquire on confirmation of selection
4. Main module 1. To display system banner.
2. To process menu
3. Initializations
4. To provide security

The following narrates the functional description in detail.


1. Management of Brides Information
1 Management of Brides
information
1.1 To create brides information file Here we will be creating brides information
with details like brides name,brides age, drides
salary along with requirements of bridegroom.
Here each and every record has to be entered
manually through keyboard, where it asks the user
to save how many records he need to enter. After
entering those records through proper format
those details which user gives can be saved
1.2 To update brides information In this module we will be able to update the
details of bride through the records which are
present in the form of age, name, salary,
educational qualification. Here we can search
those details either through age. If any extra
details have to be added we will update those
details in place of previous details.
1.3 To search brides information file In this module we will be able to search the
details of bride which are present in files, where
details will be in the form of age, name, salary,
educational qualification. Here we can search
those details either through age. Here in this
module formatter file takes control of all the
things for searching the complete details of bride
1.4 To generate reports Here in generating reports we will be able to
display all the details of records of brides with
details in the form of files.
2 Management of Bridegrooms
information
2.1 To create bridegrooms Here we will be creating bridegroomss
information file information with details like bridegrromss
name, bridegrooms age, bridegrooms salary
along with brides requirements. Here each and
every record has to be entered manually through
keyboard, where it asks the user to save how
many records he need to enter. After entering
those records through proper format those details
which user gives can be saved
2.2 To update bridegrooms In this module we will be able to update the
information details of bridegroom through the records which
are present in the form of age, name, salary,
educational qualification. Here we can search
those details either through age. If any extra
details have to be added we will update those
details in place of previous details.
2.3 To search bridegrooms In this module we will be able to search the
information file details of bride which are present in files, where
we can search those details either through age.
Here in this module formatter file takes control of
all the things for searching the complete details of
bride
2.4 To generate reports Here in generating reports we will be able to
display all the details of records of bridegrooms
with details in the form of files.
3 Matching
3.1 To make matching BridesId is read, the brides file is open and the
Brides record is displayed. Bridegrooms file is
opened and each record is investigated for the
match with brides requirement. If match is found
record is displayed.
3.2 To Intimate to bride Here in this module we need to maintain
bridegroom requirement details which have to be
mentioned to be bride. For matching, where there
will be so many records of bridegroom details for
perfect matching
3.3 To intimate to bridegroom Here in this module we need to maintain bride
requirement details which have to be mentioned
to be bride. For matching, where there will be so
many records of bride details for perfect matching
3.4 To enquire on conformation for After short listing all the records of both brides
selection and bridegrooms, where enquie will be done
based on conformation whether that bride details
were matched to bridegroom details and
bridegroom details were matched to bride details
or not
4 Main Module
4.1 To display System Banner After all modules were integrated through files
we display System Banner as MARRIAGE
BUREAU
4.2 To process menu Here Processing Menu can be done through
switch case statement with all the modules that
are present in the file
4.3 Initializations Here Initializations can be done to methods,
variables as well as objects which are present in
classes
4.4 To provide Security To provide Security we need to add user name
and password with login credentials where user
will able to access his details with valid login
credentials so that he can be able to create files,
search a file and display record of that file, where
as in admin module the admin also has to access
his entire details with username and password
where he can be able to do modifications for files
that are present in user module.
2.3 File Design
This system uses two files. The names of the files and the record layout are
given below
File Name Bride.txt
1
Field No. Field name Field Type Field Size
1 brideId; Integer 8 digits
2 brideName String 10 characters
3 brideAddress String 10 characters
4 brideMobileNo Integer 10 digits
5 brieAge Integer 2 digits
6 brideHeight Integer 2 digits
7 brideWeight Integer 2 digits
8 brideQualification String 10 characters
9 brideJobPosition String 10 characters
10 Rbgminheight Integer 2 digits
11 Rbgmaxheight Integer 2 digits
12 Rbgminweight Integer 2 digits
13 Rbgmaxweight Integer 2 digits
14 rbgJobPosition String 10 characters
15 Rbgminsalary Integer 8 digits
16 Rbgmaxsalary Integer 8 digits

File Name BrideGroom.txt


2
Field No Field name Field Type Field Size
1 bgId; Integer 8 digits
2 bgName String 10 characters
3 bgAddress String 10 characters
4 bgMobileNo Integer 10 digits
5 bgAge Integer 2 digits
6 bgHeight Integer 2 digits
7 brideWeight Integer 2 digits
8 bgQualification String 10 characters
9 bgobPosition String 10 characters
10 Rbrideminheight Integer 2 digits
11 Rbridemaxheight Integer 2 digits
12 Rbrideminweight Integer 2 digits
13 Rbridemaxweight Integer 2 digits
14 rbrideJobPosition String 10 characters
15 Rbrideminsalary Integer 8 digits
16 Rbridemaxsalary Integer 8 digits

2.4 Input Design


For creating a file, the system takes all inputs from keyboard and the writes to file.

A sample input dialog for creating brides information file is shown below
How many records?
2
Enter Brides Id:12345678
Enter Brides Name: Krishna
.
.
.
.
.

For selecting different functions of the system it displays a menu and reads the
choice of user from keyboard.
Menu
1. Create Brides File
2. Add more records to Brides file
3. Search by Bride Id;
4. Generate Report;
5. Quit

The System also takes input from files(The file design was shown earlier)
2.5 Out Put Design
The output of the system (including reports) is displayed on the console in a
formatted way. The output may also go to a file(file design already explained).
Following is the formatted output for displaying list of brides
List of brides
1. brideId.: 12345678
brideName: krishnabrideAge: 29
2. brideId.: 12345670
brideName: gopalbrideAge: 32
End of List

1. For searching details of bride with its brideId the search report will be
displayed as follows
Search by brideId
enter brideId: 12345670
1. brideId.: 12345670
brideName: gopalbrideAge: 32
2. Enter brideId:12345678
brideId.: 12345678
brideName: krishnabrideAge: 29
SOURCE CODE OF THE PROJECT:

import java.util.*;

import java.io.*;

class Brides

public static void main(String args[])throws IOException

int i,num;

int choice=0;

int
regNo,intAge,Bage=0,salary,bgminsalary,bgmaxsalary,height,Bheight=0,minHeight,maxHeight;

String name,address,qualify,bgqualify;

int bgminage=0,bgmaxage=0,bgminheight=0,bgmaxheight=0;

int searchRegNo=0;

boolean flag=true;

int snum;

//login data

String loginName;

String passWord;

String adminPassword="admin123";

String userPassword="user123";

//search data

int minAge ;

int maxAge ;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\t Brides Information");

//login procedure

while (true)

System.out.print("Login name(admin/user/quit):");

loginName=br.readLine();

if(loginName.equals("quit"))

return;

System.out.print("Password:");

passWord=br.readLine();

if(loginName.equals("admin"))

if(passWord.equals(adminPassword))

break;

if(loginName.equals("user"))

if(passWord.equals(userPassword))

break;

System.out.println("Illegal LoginName or password");

for(i=0;i<20;i++)

System.out.print("\n");//print 20 blanklines

while(flag)

System.out.println("\n Menu");

System.out.println("1. Create Bride File");


System.out.println("2. Add more records to Brides file");

System.out.println("3. Search by bride Id");

System.out.println("4. Search by range of age");

System.out.println("5. Generate Report");

System.out.println("6. Create Bridegroom File");

System.out.println("7. Add more records to Bridegrooms file");

System.out.println("8. Quit");

System.out.print("Enter your choice: ");

choice= Integer.parseInt(br.readLine());

switch(choice){

case 1:

if(!(loginName.equals("admin")))

{System.out.println

("Sorry! You have No Access");

System.out.println

("Only Administrator is allowed");

break;

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

if(num<=0)

{System.out.print("invalid number");break;

// Create a file.

FileWriter fout = new FileWriter("Bride.txt");


//Read data from Keyboard

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

for(i=0;i<num;i++)

System.out.print("enter bride id(8 digits):");

regNo = Integer.parseInt(br.readLine());

System.out.print("Enter name(10 characters):");

name=br.readLine();

System.out.print("enter age(2 digits):");

intAge = Integer.parseInt(br.readLine());

System.out.println("Enter bride's height:");

height =Integer.parseInt(br.readLine());

System.out.println("Enter bride's qualification:");

qualify=br.readLine();

System.out.println("Enter bride's salary:");

salary =Integer.parseInt(br.readLine());

System.out.println("Enter bride's address: ");

address=br.readLine();

System.out.println("Enter your requirements");

System.out.println("Enter bridegroom's qualification:");

bgqualify=br.readLine();

System.out.println("Enter minimum age of bridegroom");

bgminage = Integer.parseInt(br.readLine());

System.out.println("Enter maximum age of bridegroom");


bgmaxage = Integer.parseInt(br.readLine());

System.out.println("Enter minimum height of bridegroom");

bgminheight = Integer.parseInt(br.readLine());

System.out.println("Enter maximum height of bridegroom");

bgmaxheight = Integer.parseInt(br.readLine());

System.out.println("Enter minimum salary of bridegroom:");

bgminsalary =Integer.parseInt(br.readLine());

System.out.println("Enter maximum salary of bridegroom:");

bgmaxsalary =Integer.parseInt(br.readLine());

System.out.print("\n");//print blankline

// Write to file.

Formatter fmt1 = new Formatter();

fmt1.format("%8d\n %10s\n %2d\n %4d\n %7s\n %10d\n %10s\n %7s\n %3d\n


%3d\n %4d\n %4d\n %10d\n
%10d\n",regNo,name,intAge,height,qualify,salary,address,bgqualify,bgminage,bgmaxage,bgmin
height,bgmaxheight,bgminsalary,bgmaxsalary);

fout.write(fmt1+"\r\012");

fout.close();

System.out.println("File is created");

break;

case 2:

if(!(loginName.equals("admin")))

{System.out.println
("Sorry! You have No Access");

System.out.println

("Only Administrator is allowed");

break;

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

if(num<=0)

{System.out.print("invalid number");break;

// Append to the File.

FileWriter fout1 = new FileWriter("Bride.txt",true);//true means file will be opened in append


mode

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

for(i=0;i<num;i++)

System.out.print("enter bride id(8 digits):");

regNo = Integer.parseInt(br.readLine());

System.out.print("Enter name(10 characters):");

name=br.readLine();

System.out.print("enter age(2 digits):");

intAge = Integer.parseInt(br.readLine());

System.out.println("Enter bride's height:");

height =Integer.parseInt(br.readLine());
System.out.println("Enter bride's qualification:");

qualify=br.readLine();

System.out.println("Enter bride's salary:");

salary =Integer.parseInt(br.readLine());

System.out.println("Enter bride's address: ");

address=br.readLine();

System.out.println("Enter your requirements");

System.out.println("Enter bridegroom's qualification:");

bgqualify=br.readLine();

System.out.println("Enter minimum age of bridegroom");

bgminage = Integer.parseInt(br.readLine());

System.out.println("Enter maximum age of bridegroom");

bgmaxage = Integer.parseInt(br.readLine());

System.out.println("Enter minimum height of bridegroom");

bgminheight = Integer.parseInt(br.readLine());

System.out.println("Enter maximum height of bridegroom");

bgmaxheight = Integer.parseInt(br.readLine());

System.out.println("Enter minimum salary of bridegroom:");

bgminsalary =Integer.parseInt(br.readLine());

System.out.println("Enter maximum salary of bridegroom:");

bgmaxsalary =Integer.parseInt(br.readLine());

System.out.print("\n");//print blankline

// Write to file.

Formatter fmt9 = new Formatter();


fmt9.format("%8d\n %10s\n %2d\n %4d\n %7s\n %10d\n %10s\n %7s\n %3d\n
%3d\n %4d\n %4d\n %10d\n
%10d\n",regNo,name,intAge,height,qualify,salary,address,bgqualify,bgminage,bgmaxage,bgmin
height,bgmaxheight,bgminsalary,bgmaxsalary);

fout1.write(fmt9+"\r\012");

fout1.close();

System.out.println("new records are added");

break;

case 3: snum=0;

System.out.print("enter search Id: ");

searchRegNo = Integer.parseInt(br.readLine());

//Read data from file

FileReader fin1 = new FileReader("Bride.txt");

Scanner sc1 = new Scanner(fin1);

while(sc1.hasNextInt())

regNo = sc1.nextInt();

name = sc1.next();

intAge= sc1.nextInt();

height= sc1.nextInt();

qualify = sc1.next();

salary= sc1.nextInt();

address = sc1.next();

bgqualify = sc1.next();

bgminage = sc1.nextInt();
bgmaxage = sc1.nextInt();

bgminheight = sc1.nextInt();

bgmaxheight = sc1.nextInt();

bgminsalary= sc1.nextInt();

bgmaxsalary= sc1.nextInt();

if(regNo==searchRegNo)

//Display formatted output

++snum;//increment serial number

Formatter fmt2 = new Formatter();

fmt2.format("%8d\n %10s\n %2d\n %4d\n %7s\n %10d\n %10s\n %7s\n %3d\n


%3d\n %4d\n %4d\n %10d\n
%10d\n",regNo,name,intAge,height,qualify,salary,address,bgqualify,bgminage,bgmaxage,bgmin
height,bgmaxheight,bgminsalary,bgmaxsalary);

Formatter fmt3 = new Formatter();

fmt3.format("\tName: %10s",name);

Formatter fmt4 = new Formatter();

fmt4.format("\tBride Age : %2d",intAge);

System.out.println(fmt2);

System.out.println(fmt3);

System.out.println(fmt4);

if(snum>0)

System.out.println("Search is completed");

else
System.out.println("Search is completed- No match");

fin1.close();

break;

case 4://search by range of age

snum=0;

FileReader fin11 = new FileReader("Bride.txt");

Scanner sc11 = new Scanner(fin11);

minAge = bgminage;

maxAge = bgmaxage;

minHeight = bgminheight;

maxHeight = bgmaxheight;

//Open the data file

FileReader fin2 = new FileReader("Bridegroom.txt");

Scanner sc2 = new Scanner(fin2);

//Read each record from file

while(sc2.hasNextInt())

regNo = sc2.nextInt();

name = sc2.next();

intAge= sc2.nextInt();

height= sc2.nextInt();

//Match each record with search criteria

//and find the matching record

if(Bage<minAge)continue;//reject that record

if(Bage>maxAge)continue;//reject that record


if(Bheight<minHeight)continue;//reject that record

if(Bheight>maxHeight)continue;//reject that record

//Display the matching record (formatted output)

++snum;//increment serial number

Formatter fmt2 = new Formatter();

fmt2.format("%2d.\tRegNo : %8d",snum,regNo);

Formatter fmt3 = new Formatter();

fmt3.format

("\tName: %10s Bridegroom Age: %2d Height:%4d", name, Bage, Bheight);

System.out.println(fmt2);

System.out.println(fmt3);

if(snum>0)

System.out.println("Search is completed");

else

System.out.println("Search is completed- No match");

fin2.close();

break;

case 5:snum=0;

System.out.println("\t\t\t List of Brides");

//Read data from file

FileReader fin3 = new FileReader("Bride.txt");

Scanner sc3 = new Scanner(fin3);

while(sc3.hasNextInt())

{
regNo = sc3.nextInt();

name = sc3.next();

intAge= sc3.nextInt();

height= sc3.nextInt();

qualify = sc3.next();

salary= sc3.nextInt();

address = sc3.next();

bgqualify = sc3.next();

bgminage = sc3.nextInt();

bgmaxage = sc3.nextInt();

bgminheight = sc3.nextInt();

bgmaxheight = sc3.nextInt();

bgminsalary= sc3.nextInt();

bgmaxsalary= sc3.nextInt();

//Display formatted output

++snum;//increment serial number

Formatter fmt7 = new Formatter();

fmt7.format("Bride Id: %8d\n BrideName: %10s\n Age: %2d\n Height: %4d\n Brides
Qualification: %7s\n Brides Salary: %10d\n Brides Address: %10s\n Bridegrooms
Qualification: %7s\n Bridegrooms min age: %3d\n Bridegrooms max age: %3d\n
Bridegroomsmin height: %4d\n Bridegroomsmax height: %4d\n Bridegrooms min salary:
%10d\n Bridegrooms max salary:
%10d\n",regNo,name,intAge,height,qualify,salary,address,bgqualify,bgminage,bgmaxage,bgmin
height,bgmaxheight,bgminsalary,bgmaxsalary);

System.out.println(fmt7);

System.out.println("End of list");
fin3.close();

break;

case 6:

if(!(loginName.equals("admin")))

{System.out.println

("Sorry! You have No Access");

System.out.println

("Only Administrator is allowed");

break;

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

if(num<=0)

{System.out.print("invalid number");break;

// Create a file.

FileWriter fout6 = new FileWriter("Bridegroom.txt");

//Read data from Keyboard

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

for(i=0;i<num;i++)

System.out.print("enter bridegroom id(8 digits):");

regNo = Integer.parseInt(br.readLine());

System.out.print("Enter bridegroom name(10 characters):");


name=br.readLine();

System.out.print("enter bridegroom's age(2 digits):");

Bage = Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's height:");

Bheight =Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's qualification:");

qualify=br.readLine();

System.out.println("Enter bridegroom's salary:");

salary =Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's address: ");

address=br.readLine();

System.out.print("\n");//print blankline

// Write to file.

Formatter fmt5 = new Formatter();

fmt5.format("%8d\n %10s\n %2d\n %4d\n %7s\n %10d\n %10s\n


",regNo,name,Bage,Bheight,qualify,salary,address);

fout6.write(fmt5+"\r\012");

fout6.close();

System.out.println("File is created");

break;

case 7:

if(!(loginName.equals("admin")))

{System.out.println

("Sorry! You have No Access");


System.out.println

("Only Administrator is allowed");

break;

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

if(num<=0)

{System.out.print("invalid number");break;

// Create a file.

FileWriter fout16 = new FileWriter("Bridegroom.txt",true);

//Read data from Keyboard

System.out.print("How many records? ");

num= Integer.parseInt(br.readLine());

for(i=0;i<num;i++)

System.out.print("enter bridegroom id(8 digits):");

regNo = Integer.parseInt(br.readLine());

System.out.print("Enter bridegroom name(10 characters):");

name=br.readLine();

System.out.print("enter bridegroom's age(2 digits):");

Bage = Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's height:");

Bheight =Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's qualification:");


qualify=br.readLine();

System.out.println("Enter bridegroom's salary:");

salary =Integer.parseInt(br.readLine());

System.out.println("Enter bridegroom's address: ");

address=br.readLine();

System.out.print("\n");//print blankline

// Write to file.

Formatter fmt25 = new Formatter();

fmt25.format("%8d\n %10s\n %2d\n %4d\n %7s\n %10d\n %10s\n


",regNo,name,Bage,Bheight,qualify,salary,address);

fout16.write(fmt25+"\r\012");

fout16.close();

System.out.println("File is created");

break;

case 8: flag=false;

break;

default:System.out.println("Wrong Choice!!");

System.out.println("Program is over");

}
CONLUSION:
The Marriage Bureau system is maintained
the information of brides and bridegrooms. It makes a matching between brides
and bridegrooms depending on their requirements. The system provides facility to
insertion of records. Search facility is provided to search for the information in the
file. The system makes a matching between bride’s and bridegroom’s requirement.
The system provides security through login and password .Here, only matching of
bridegroom to bride is arranged. We can also can match bride to bridegroom.

BIBLIOGRAPHY:

The Complete Reference Java – 7th edition

www.wikipedia.org

http://www.geeksforgeeks.org/

http://stackoverflow.com/

You might also like