Sie sind auf Seite 1von 39

Roll No.

s:-90080302449, 90080302458, 90080302476,

Six Months Industrial Training Project report On Madame Management

Baba Farid College Of Engineering and Technology Bathinda

Submitted To: Submitted By:


Jaspreet Kaur(90080302449) Lovleen Gupta(90080302458) Samandeep Kaur(90080302476)

[Type text]

Page 1

Roll No.s:-90080302449, 90080302458, 90080302476,

ACKNOWLEDGEMENT

I would like to thank Mr. MJS Dhillon (Director of INFOWIZ) for providing this opportunity to take training on Core Java/Android technology under his guidance. I would like to humbly and sincerely thank to Ms. Jenifa Chauhan, (Supervisor and Department Manager) and Mr. Ankur (Trainer), INFOWIZ for their generous guidance, valuable suggestions and encouragement given to me at different stages.
Last but not the least, I express my heartiest gratitude to Almighty god, my Parents for their love and blessings to get such a wonderful opportunity

[Type text]

Page 2

Roll No.s:-90080302449, 90080302458, 90080302476,

ABSTRACT
This is a project report on madame management During the making/developing of this project we explored new ideas and functionality behind the working of a notepad. We have learnt a lot during this project and liked the improvement in our testing skills and deep concept related to these kinds of projects. Our project is Madame Management. This is a offline application which helps people to give the facility to manage the details of staff details, customer details, discounts and other facilities provided to customers.

[Type text]

Page 3

Roll No.s:-90080302449, 90080302458, 90080302476,

PREFACE
Learning comes from doing. To learn something one has to go through Practical conditions. Recognizing this fact, the University has made it essential forB.Tech students to undergo Industrial Training for six weeks. During this period, the student learns about the functioning of the organization and the actual business environment. Also this training helps the student how to implement the theoretical knowledge into practical life, in our day to day life. This project report was prepared during the training period in the month of May June. During this period, an effort was made to understand Madame Management and to finish the project work assigned to us. This report lays special emphasis on the operational work, tasks and projects carried out during the training period.

[Type text]

Page 4

Roll No.s:-90080302449, 90080302458, 90080302476,

LIST OF CONTENTS
Sr.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. FrontPage Acknowledgement Abstract Preface List of contents Organization Overview Project Description Components of Projects Requirement Analysis Java history Java concepts System Design 1. Data Flow Diagrams 2. Screen Shots CONTENTS PAGE NO 1 2 3 4 5 6 7 8 9 10-11 12-31 32-37 Remarks

[Type text]

Page 5

Roll No.s:-90080302449, 90080302458, 90080302476,

COMPANY PROFILE

INFOWIZ is an 6 years young organization with ISO Certification which has been working in the field of IT , Embedded System and has been providing its clients with exceptional quality in Web Design, Web Development and SEO services. Our clients range from small, medium to large scale Business houses & individuals. We also provide the off shore companies of US, UK, France, Ireland, Canada and Australia with quality and timely Web and SEO services.

INFOWIZ is an organization which is established in the field of Web Development ( PHP & .NET ), JAVA (Core as well as Advance), Iphone & Android Applications, Embedded

systems(AVR, PIC & ARM), and ROBOTICS. INFOWIZ does not boast itself of being the best Development Company but enjoys reputable position among top Web Development and Electronics companies because of our timely delivery and quality work. Our skilled team of professionals make sure that the product is developed as per the customers needs and also keeping the customer informed about the development of his project from time to time. We do not only emphasize on formulating an attractive solution to our clients but also believe in providing a workable solution. INFOWIZ offers research based Search Engine Marketing products that help achieve greater insights to customers online business. Our Research & Development arm offers SEO tools for SEM professionals.

[Type text]

Page 6

Roll No.s:-90080302449, 90080302458, 90080302476,

PROJECT DESCRIPTION
This is an Madame Management project. In this project we are showing a Showroom Management functionality. In this Project We have one panel: Admin Panel. Admin can insert ,update or delete customers to customer details and also staff details database.

We made this application in Core java and my database is MS SQL Server 2005. We have our database in application folder App data. To run this application just attaches this database on your machine and change the connection string. Now when you run the application for the first time the login page will show. If you have already registered with the site, then enter your username and password and the application will redirect to your login page.

[Type text]

Page 7

Roll No.s:-90080302449, 90080302458, 90080302476,

COMPONENTS OF THE PROJECT


1. How to Login a. In this module, the user will enter his username and password to goto home page.

2. Home Page.
Customer Details : This button refers to the page of Customer details who are registered. Staff Info: This button refers to the page of general information of staff of madame showroom.

Inventory: This button refers to the page of details of products available and
required. Bill: This button refers to the page which contains discounts and products information of the products customer requires.

[Type text]

Page 8

Roll No.s:-90080302449, 90080302458, 90080302476,

REQUIREMENT ANALYSIS
Hardware Requirements Number 1 2 Description Computer System 1GBRAM

Software Requirements Number 1 2 3 Description Windows XP 7,any OS supporting NetBeans and MsSQL NetBeans MsSql Server 2005

[Type text]

Page 9

Roll No.s:-90080302449, 90080302458, 90080302476,

INTRODUCTION TO TOOLS
FRONT-END/BACK-END
Front-End: Back-End: NetBeans MsSQL SERVER 2005

Front End:

Net Beans Net Beans is an integrated development environment (IDE) from Sun
Microsystems. It is used to develop console and graphical user interface applications along

with Windows Forms applications, web sites, web applications, and web services. NetBeans supports different programming languages by means of language services, which allow the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C/C++ .

Backend:

SQLSERVER Microsoft SQL Server is a relational database server, developed by


Microsoft: it is a software product whose primary function is to store and retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). There are at least a dozen different editions of Microsoft SQL Server aimed at different audiences and for different workloads (ranging from small applications that store and retrieve data on the same computer, to millions of users and computers that access huge amounts of data from the Internet at the same time).

[Type text]

Page 10

Roll No.s:-90080302449, 90080302458, 90080302476,

HISTORY
The Java platform and language began as an internal project at Sun Microsystems in December 1990, providing an alternative to the C++/C programming languages. Engineer Patrick Naughton had become increasingly frustrated with the state of Sun's C++ and C application programming interfaces (APIs) and tools. While considering moving to NeXT, Naughton was offered a chance to work on new technology and thus the Stealth Project was started. The Stealth Project was soon renamed to the Green Project with James Gosling and Mike Sheridan joining Naughton. Together with other engineers, they began work in a small office on Sand Hill Road in Menlo Park, California. They were attempting to develop a new technology for programming next generation smart appliances, which Sun expected to be a major new opportunity. The team originally considered using C++, but it was rejected for several reasons. Because they were developing an embedded system with limited resources, they decided that C++ needed too much memory and that its complexity led to developer errors. The language's lack of garbage collection meant that programmers had to manually manage system memory, a challenging and error-prone task. The team was also troubled by the language's lack of portable facilities for security, distributed programming, and threading. Finally, they wanted a platform that could be easily ported to all types of devices. Bill Joy had envisioned a new language combining Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented environment based on C++. Initially, Gosling attempted to modify and extend C++ (that he referred to as "C++ ++ --") but soon abandoned that in favor of creating a new language, which he called Oak, after the tree that stood just outside his office.

[Type text]

Page 11

Roll No.s:-90080302449, 90080302458, 90080302476,

By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a personal digital assistant (PDA) device named Star7 that had a graphical interface and a smart agent called "Duketo assist the user. In November of that year, the Green Project was spun off to become firstperson, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto, California. The first person team was interested in building highly interactive devices, and when Time Warner issued a request for proposal (RFP) for a set-top box, firstperson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user and firstperson lost their bid to SGI. An additional deal with The 3DO Company for a set-top box also failed to materialize. Unable to generate interest within the TV industry, the company was rolled back into Sun.

[Type text]

Page 12

Roll No.s:-90080302449, 90080302458, 90080302476,

INTRODUCTION TO JAVA

Java is an object-oriented programming language with a built -in application programming interface (API) that can handle graphics and u ser interfaces and that can be used to create applications or applets. Because of its rich set of API's, similar to Macintosh and Windows, and its platform independence, Java can also be thought of as a platform in itself. Java also has standard libraries for doing mathematics. Much of the syntax of Java is the same as C and C++. One major difference is that Java does not have pointers. However, the biggest difference is that you must write object oriented code in Java. Procedural pieces of code can only be embedded in objects. In the following we assume that the reader has some familiarity with a programming language. In particular, some familiarity with the syntax of C/C++ is useful. In Java we distinguish between applications, which are programs that perform the same functions as those written in other programming languages, and applets, which are programs that can be embedded in a Web page and accessed over the Internet. Our initial focus will be on writing applications. When a program is compiled, a byte code is produced that can be read and executed by any platform that can run Java.

[Type text]

Page 13

Roll No.s:-90080302449, 90080302458, 90080302476,

Java Features

Java is simple, easy to design , easy to write, and therefore easy to compile, debug, and learn than any other programming languages.

Java is object-oriented, that is used to build modular programs and reusable code in other application.

Java is platform-independent and flexible in nature. The most significant feature of Java is to run a program easily from one computer system to another.

Java works on distributed environment. It is designed to work on distributed computing , Any network programs in Java is same as sending and receiving data to and from a file.

Java is secure. The Java language, compiler, interpreter and runtime environment are securable .

Java is robust. Robust means reliability. Java emphasis on checking for possible errors, as Java compilers are able to detect many error problem in program during the execution of respective program code.

Java supports multithreaded. Multithreaded is the path of execution for a program to perform several tasks simultaneously within a program. The java come with the concept of Multithreaded Program. In other languages, operating system-specific procedures have to be called in order to work on multithreading.

Java fully follows oops.

[Type text]

Page 14

Roll No.s:-90080302449, 90080302458, 90080302476,

The Simple Types

Java defines eight simple (or elemental) types of data: byte, short, int, long, char, float, double, and boolean.

These can be put in four groups:-

1) Integers :

This group includes byte, short, int, and long, which are for whole-valued signed numbers. Floating-point numbers This group includes float and double, which represent numbers with fractional precision. All of these are signed, positive and negative values. Java does not support unsigned, positive -only integers. The width of an integer type should not be thought of as the amount of storage it consumes, but rather as the behavior it defines for variables and expressions of that type.

The Java run-time environment is free to use whatever size it wants, as long as the types behave as you declared them. In fact, at least one implementation stores bytes and shorts as 32-bit (rather than 8- and 16-bit) values to improve performance, because that is the word size of most computers currently in use. The width and ranges of these integer types vary widely, as shown in this table:

a) Byte The smallest integer type is byte. This is a signed 8-bit type that has a range from 128 to 127. Variables of type byte are especially useful when you're working with a stream of data from a network or file. They are also useful when you're working with raw binary data that may not be directly compatible with Java's other built -in types. Byte variables are declared by use of the byte keyword. For example, the following declares two byte variables called b and c: byte b, c;
[Type text] Page 15

Roll No.s:-90080302449, 90080302458, 90080302476,

b) Short
Short is a signed 16-bit type. It has a range from 32,768 to 32,767. It is probably the least-used Java type, since it is defined as having its high byte first (called big-endian format). This type is mostly applicable to 16 -bit computers, which are becoming increasingly scarce.

Here are some examples of short variable declarations:


o o

short s; short t;

c) Int

The most commonly used integer type is int. It is a signed 32-bit type that has a range. Its range is from 2,147,483,648 to 2,147,483,647. Any time you have an integer expression involving bytes, shorts, ints, and literal numbers, the entire expression is promoted to int before the calculation is done.

d) Long

Long is a signed 64-bit type and is useful for those occasions where an int type is not large enough to hold the desired value. The range of a long is quite large. This makes it useful when big, whole numbers are needed.

. 2) Floating-Point Types
Floating-point numbers, also known as real numbers, are used when evaluation expressions that require fractional precision. There are two kinds of floating -point types, float and double, which represent single- and double-precision numbers. Their width and ranges are shown here:

[Type text]

Page 16

Roll No.s:-90080302449, 90080302458, 90080302476,

a) Float The type float specifies a single-precision value that uses 32 bits of storage. Single precision is faster on some processors and takes half as much space as double precision, but will become imprecise when the values are either very large or very small. Variables of type float are useful when you need a fractional component, but don't require a large degree of precision. For example, float can be useful when representing dollars and cents. Here are some example float variable declarations: float hightemp, lowtemp. b) Double Double precision, as denoted by the double keyword, uses 64 bits to store a value. Double precision is actually faster than single precision on some modern processors that have been optimized for high -speed mathematical calculations. All transcendental math functions, such as sin( ), cos( ), and sqrt( ), return double values. When you need to maintain accuracy over many iterative calculations, or are manipulating large valued numbers, double is the best choice. Here is a short program that uses double variables to compute the area of a circle: Compute the area of a circle. class Area { public static void main(String args[]) { double pi, r, a; r = 10.8; // radius of circle pi = 3.1416; // pi, approximately a = pi * r * r; // compute area System.out.println("Area of circle is " + a);}}

3) Characters This group includes char, which represents symbols in a character set, like letters and numbers. In Java, the data type used to store characters is char. Java uses Unicode to represent characters. Unicode defines a fully international character set that can represent all of the characters found in all human languages. In Java char is a 16-bit type. The range of a char is 0 to 65,536. There are no negative chars. The standard set of characters known as ASCII still

[Type text]

Page 17

Roll No.s:-90080302449, 90080302458, 90080302476,

ranges from 0 to 127 as always, and the extended 8 -bit character set, ISO-Latin-1, ranges from 0 to 255.

Here is a program that demonstrates char variables: // Demonstrate char data type. class CharDemo { public static void main(Str ing args[]) { char ch1, ch2; ch1 = 88; // code for X ch2 = 'Y'; System.out.print("ch1 and ch2: "); System.out.println(ch1 + " " + ch2); } }

This program displays the following output: ch1 and ch2: X Y

Notice that ch1 is assigned the value 88, which is the ASCII (and Unicode) value that corresponds to the letter X.

Even though chars are not integers, in many cases you can operate on them as if they Were integers. This allows you to add two characters together, or to increment the value of a character variable.

[Type text]

Page 18

Roll No.s:-90080302449, 90080302458, 90080302476,

4) Boolean This group includes boolean, which is a special type for representing true/false values. You can use these types as -is, or to construct arrays or your own class types. Thus, they form the basis for all other types of data that you can create. Java has a simple type, called boolean, for logical values. It can have only one of two possible values, true or false. This is the type returned by all relational operators, such as a < b. boolean is also the type required by the conditional expressions that govern the control statements such as if and for. Here is a program that demonstrates the boolean type: // Demonstrate boolean values. class BoolTest { public static void main(String args[]) { boolean b; b = false; System.out.println("b is " + b); b = true; System.out.println("b is " + b); // a boolean value can control the if statement if(b) System.out.println("This is executed."); b = false; if(b) System.out.println("This is not executed."); // outcome of a relational operator is a boo lean value System.out.println("10 > 9 is " + (10 > 9)); } } The output generated by this program is shown here: b is false b is true This is executed. 10 > 9 is true
[Type text] Page 19

Roll No.s:-90080302449, 90080302458, 90080302476,

There are three interesting things to notice about this program. First, as you can see, when a boolean value is output by println( ), "true" or "false" is displayed. Second, the value of a boolean variable is sufficient, by itself, to control the if statement. There is no need to write an if statement like this: if(b == true) ... Third, the outcome of a relational operator, such as <, is a boolean value. This is why the expression 10 > 9 displays the value "true."

Type Conversion and Casting


If you have previous programming experience, then you already know that it is fairly common to assign a value of one type to a varia ble of another type. If the two types are compatible, then Java will perform the conversion automatic ally. For example, it is always possible to assign an int value to a long variable. However, not all types are compatible, and thus, not all type conversio ns are implicitly allowed. For instance, there is no conversion defined from double to byte. To do so, you must use a cast, which performs an explicit conversion between incompatible types. Let's look at both automatic type conversions and casting.

Java's Automatic Conversions


When one type of data is assigned to another type of variable, an automatic type conversion will take place if the following two conditions are met:

The two types are compatible. The destination type is larger than the source type.

When these two conditions are met, a widening conversion takes place. For example, the int type is always large enough to hold all valid byte values, so no explicit cast statement is required. For widening conversions, the numeric types, including integer and floating-point types, are compatible with each other. However, the numeric types are not compatible with char or Boolean . Also, char and boolean are not compatible with each other.
[Type text] Page 20

Roll No.s:-90080302449, 90080302458, 90080302476,

As mentioned earlier, Java also performs an automatic type conversion when storing a literal integer constant into variables of type byte, short, or long.

Casting Incompatible Types


To create a conversion between two incompatible types, you must use a cast. A cast is simply an explicit type conversion. It has this general form: (target-type) value. Here, target-type specifies the desired type to convert the specified value to.

For example, the following fragment casts an int to a byte. If the integer's value is larger than the range of a byte, it will be reduced modulo byte's range. int a; byte b; // ... b = (byte) a;

A different type of conversion will occur when a floating -point value is assigned to an integer type: truncation. As you know, integers do not ha ve fractional components. Thus, when a floating-point value is assigned to an integer type, the fractional component is lost. For example, if the value 1.23 is assigned to an integer, the resulting value will simply be 1. The 0.23 will have been truncated. Of course, if the size of the whole number component is too larg e to fit into the target integer type, then that value will be reduced modulo the target type's range.

The following program demonstrates some type conversions that require casts: // Demonstrate casts. class Conversion { public static void main(String args []) { byte b;
[Type text] Page 21

Roll No.s:-90080302449, 90080302458, 90080302476,

int i = 257; double d = 323.142; System.out.println("\\nConversion of int to byte."); b = (byte) i; System.out.println("i and b " + i + " " + b); System.out.println("\\nConversion of double to int."); i = (int) d; System.out.println("d and i " + d + " " + i); System.out.println("\\nConversion of double to byte."); b = (byte) d; System.out.println("d and b " + d + " " + b); } } This program generates the following output: Conversion of int to byte. i and b 257 1 Conversion of double to int. Core Java Student Guide Page 19 of 95 d and i 323.142 323 Conversion of double to byte. d and b 323.142 67

[Type text]

Page 22

Roll No.s:-90080302449, 90080302458, 90080302476,

Inheritance in Java
Inheritance is a compile-time mechanism in Java that allows you to extend a class (called the base class or super class) with another class (called the derived class or subclass). In Java, inheritance is used for two purposes:

1. class inheritance - create a new class as an extension of another class, primarily for the
purpose of code reuse. That is, the derived class inherits the public methods and public data of the base class. Java only allows a class to have one immediate base class, i.e., single class inheritance.

2. interface inheritance - create a new class to implement the methods defined as part of an
interface for the purpose of subtyping. That is a class that implements an interface conforms to (or is constrained by the type of) the interface. Java supports multiple interface inheritance. In Java, these two kinds of inheritance are made distinct by using different language syntax. For class inheritance, Java uses the keyword extends and for interface inheritance Java uses the Keyword implements.

public class derived-class-name extends base-class-name { // derived class methods extend and possibly override // those of the base class } public class class-name implements interface-name { // class provides an implementation for the methods // as specified by the interface }

[Type text]

Page 23

Roll No.s:-90080302449, 90080302458, 90080302476,

Class inheritance
This mechanism of deriving a new class from existing/old class is called inheritance. The old class is known as base class, super class or parent class; and the new class is known as sub class, derived class, or child class. The inheritance allows subclasses to inherit all properties (variables and methods) of their parent classes.

The different forms of inheritance are:

Single inheritance (only one super class) Multiple inheritance (several super classes) Hierarchical inheritance (one super class, many sub classes) Multi-Level inheritance (derived from a derived class) Hybrid inheritance (more than two types) Multi-path inheritance (inheritance of some properties from two sources).

Abstract Base Classes

An abstract class is a class that leaves one or more method implementations unspecified by declaring one or more methods abstract. An abstract method has no body (i.e., no implementation). A subclass is required to override the abstract method and provide an implementation. Hence, an abstract class is incomplete and cannot be instantiated, but can be used as a base class. abstract public class abstract-base-class-name { // abstract class has at least one abstract method public abstract return-type abstract-method-name ( formal-params ); ... // other abstract methods, object methods, class methods }

[Type text]

Page 24

Roll No.s:-90080302449, 90080302458, 90080302476,

public class derived-class-name extends abstract-base-class-name { public return-type abstract-method-name (formal-params) { stmt-list; } ... // other method implementations } It would be an error to try to instantiate an object of an abstract type: abstract-class-name obj = new abstract-class-name(); // ERROR! That is, operator new is invalid when applied to an abstract class.

Constructors in Java
All about allocating resources before an object is use And freeing resources when an object is done. Constructors are done right in Java and make a lot of sense.

Default Values
At object allocation Java assigns each member var its default value If you want, you can give an explicit initialization class Foo { private int a = 12; private IDoubleVector b = new DenseDoubVector (2, 0); private double c; ... }

Initialized in order of declaration

And initialized before any constructor code is executed Note: statics only initialized once, at first creation of object of that type

[Type text]

Page 25

Roll No.s:-90080302449, 90080302458, 90080302476,

Providing Initialization Code


Can have a block of code that is always run before constructor class Foo { int a; { System.out.println (This codell run before the); System.out.println (constructor.); } Foo () { System.out.println (Here is the constructor.); }

}
Foo bar = new Foo (); What does this do? Note: can have block labeled static... what happens then?

Calling Super class Constructors


The default (no-param) superclass const. is automatically called Invoked before anything else is done to the subclass This can cause a chain of invocations, all the way back to Object If you want another constructor, use call to super Must be the first statement in a named constructor class Foo extends Bar { { System.out.println (Hi mom!); } Foo () { super (2);
[Type text] Page 26

Roll No.s:-90080302449, 90080302458, 90080302476,

System.out.println (Here is the constructor.); } } ... Foo bar = new Foo ();

Interface
It defines a standard and public way of specifying the behavior of classes Defines a contract All methods of an interface are abstract methods Defines the signatures of a set of methods, without the body (implementation of the methods) A concrete class must implement the interface (all the abstract methods of the Interface) It allows classes, regardless of their locations in the class hierarchy, to implement common behaviors.

Why Interfaces? To reveal an object's programming interface(functionality of the object) without revealing its implementation This is the concept of encapsulation The implementation can change without affecting the caller of the interface The caller does not need the implementation at the compile time

It needs only the interface at the compile time During runtime, actual object instance is associated with the interface type.

[Type text]

Page 27

Roll No.s:-90080302449, 90080302458, 90080302476,

Multi-Threading in java
Executing program with multiple threads in parallel Special form of multiprocessing

Thread

sequentially executed stream of instructions Shares address space with other threads Has own execution context

Multiple threads in process execute same program also known as lightweight process.

Captures logical structure of problem May have concurrent interacting components Can handle each component using separate thread Simplifies programming for problem Better utilize hardware resources When a thread is delayed, compute other threads Given extra hardware, compute threads in parallel Reduce overall execution time

Creating Threads in Java


You have to specify the work you want the thread to do Define a class that implements the Runnable interface

public interface Runnable { public void run(); } Put the work in the run method Create an instance of the worker class and create a thread to run it or hand the worker instance to an executor

[Type text]

Page 28

Roll No.s:-90080302449, 90080302458, 90080302476,

Thread Class
public class Thread { public Thread(Runnable R); // Thread R.run() public Thread(Runnable R, String name); public void start(); // begin thread execution ... }

Creating Threads in Java Runnable interface


Create object implementing Runnable interface Pass it to Thread object via Thread constructor Example public class MyT implements Runnable { public void run() { // work for thread } } Thread t = new Thread(new MyT()); // create thread t.start(); // begin running thread // thread executing in parallel

[Type text]

Page 29

Roll No.s:-90080302449, 90080302458, 90080302476,

Alternative (Not Recommended)


Directly extend Thread class public class MyT extends Thread { public void run() { // work for thread } } MyT t = new MyT(); // create thread t.start(); // begin running thread

Java thread can be in one of these states


New thread allocated & waiting for start() Runnable thread can execute Blocked thread waiting for event (I/O, etc.) Terminated thread finished

new

New IO,Slee p,join Termianted state

Runnable state IO COMPLETE,SLEE P EXPIRED

Blocked state

Transitions between states caused by


Invoking methods in class Threadstart(), yield(), sleep() Other (external) events Scheduler, I/O, returning from run()
Page 30

[Type text]

Roll No.s:-90080302449, 90080302458, 90080302476,

Java swings
What is Swing? An API for Graphical User Interfaces (GUI) Created to provide a more sophisticated set of GUI components than the Abstract Windows Toolkit (AWT) Part of the Java Foundation Classes (JFC) Lightweight components because they lookconsistent on platforms

GUI application tasks:


Call constructor of the JFrame superclass. Get an object reference to the content pane container GUI objects are added to this pane Set the layout manager to arrange GUI components in the window Instantiate each component Add each component to the content pane Set the window size Display the window

Swing Components:
JLabel displays an image or readonly text JTextField singleline text box for input JTextArea multiple line text box JPasswordField single line for accepting passwords but not displaying what is typed JButton command button JRadioButton toggle one in a group JCheckBox user selects 0, 1, or more options in a group JList list of items to select 1 or more JComboBox dropdown list to select one item

[Type text]

Page 31

Roll No.s:-90080302449, 90080302458, 90080302476,

Event Handling

GUIs are eventdriven user choose to act and the GUI responds via an event handler

To program for this we need to: Write a listener (event handler) Instantiate an object of that class Register the listener on 1 or more components

What fires?
JTextField and JTextArea pressing enter; event object =ActionEvent JButton pressing the button; event object = ActionEvent JRadioButton, JCheckBox, JComboBox making a choice; event object = ItemEvent JList selecting an item; event object = ListSelectionEvent Any component mouseup or mousedown or moving the mouse; event object = MouseEvent

Dialog Boxes in Swing JDialog is directly descended from the Dialogclass JDialog contains a rootPane hierarchy including a contentPane All dialogs are modal, which means the current thread is blocked until user interaction with it has been completed. Types of Dialog Boxes

JOptionPane.showMessageDialog

reports something that has happened to the user

JOptionPane.showConfirmDialog asks for a confirming response e.g. yes, no, cancel JOptionPane.showInputDialog prompt the user for input

[Type text]

Page 32

Roll No.s:-90080302449, 90080302458, 90080302476,

Madame Management
In this project we are showing a Showroom Management functionality. In this Project We have one panel: Admin Panel. Admin can insert ,update or delete customers to customer details and also staff detais database. We made this application in Core java and my database is MS SQL Server 2005. We have our database in application folder App_data. To run this application just attaches this database on your machine and change the connection string. Now when you run the application for the first time the login page will show. If you have already registered with the site, then enter your username and password and the application will redirect to your login page. DATA FLOW DIAGRAMS

Home page

Login page

Custome r detail

Madame managment

Invent ory

Staff Information n
[Type text]

bill

Page 33

Roll No.s:-90080302449, 90080302458, 90080302476,

DATABASES

Inventory

Customer detail

Staff information

registratio n

S_id

name

E id

F name

size

C_id

name

L name

available

phone

P_no

address

required

address

address

city

price

Email id E mail id Work experience

Mobile date

User name [Type text] Page 34

Roll No.s:-90080302449, 90080302458, 90080302476,

SCREEN SHOTS OF PROJECT


Log-in Page: Customer and staff who are already registered will fill their username & password otherwise they will get registered first by clicking on register button.

[Type text]

Page 35

Roll No.s:-90080302449, 90080302458, 90080302476,

Home page: our home page contains 4 buttons which are bill, customer details , inventory, staff information.

Registeration page: Any new user will get registered first and then will be able to goto home page.

[Type text]

Page 36

Roll No.s:-90080302449, 90080302458, 90080302476,

Staff info: This page will contain the general information about the staff members of showroom.

Customer details: This page will contains the basic information about customers .

[Type text]

Page 37

Roll No.s:-90080302449, 90080302458, 90080302476,

Inventory: This page will keep the record of number of items present in showroom as well as required no. of items.

No. of items available/required :this page will help to know no. of item of that particular product Present and required in showroom.

[Type text]

Page 38

Roll No.s:-90080302449, 90080302458, 90080302476,

[Type text]

Page 39

Das könnte Ihnen auch gefallen