INTRODUCTION

TEMPERATERE CONVERTER
Change the temperature from one form to other.
Celcius  Fahrenheit  Reaumur

This program provide a different form of temperature

- Celcius: it is SI unit of temperature. - Fahrenheit: On the Fahrenheit scale, the freezing point of water is 32 degrees Fahrenheit (°F) and
the boiling point 212 °F (at standard atmospheric pressure). This puts the boiling and freezing points of water exactly 180 degrees apart. - Reaumur: The Réaumur scale (°Ré, °Re, °R), also known as the "octogesimal division" is a temperature scale in which the freezing and boiling points of water are set to 0 and 80 degrees respectively. The scale is named after René Antoine Ferchault de Réaumur who first proposed something similar in 1730.

ABOUT JAVA Java technology is both a programming language and a platform.

The Java Programming Language The Java programming language is a high-level language that can be characterized by all of the following buzzwords:          Compiled and Interpreted Platform independent & Portable Object-Oriented Robust & Secure Distributed Simple , Small & Familiar Multithreaded & Interactive High Performance Dynamic & Extensible

The Java Environment

• An exception is thrown by a program or a runtime environment and can be caught and handled appropriately. it evaluates to either true or false • true.g. false are values of the boolean data Type. • Java applications must include a class with a main method.Program Organization Standards Each class is implemented in its own source file. E.. Java Exception Handling • An exception is an object that defines an unusual or erroneous situation. – public static void main(String args[]) Unlike C++ a logic expression does not evaluate to 0 (FALSE) and non-0 (TRUE). • Java supports user-defined and predefined exceptions:  ArithmeticException  ArrayIndexOutOfBoundsE xception . • Include one class per file:– Name of the Java file is the same as the class name.

and Mac OS. and more. Most platforms can be described as a combination of the operating system and underlying hardware. to networking and security. running. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. high-level Java programming language is a powerful software platform.out. FileNotFoundException  InstantiationException Exception handling allows a programmer to divide a program into a normal execution flow and an exception execution flow. If an exception is not handled the program will terminate (abnormally) and produce a message. Linux. } } Java. Solaris OS. Application Programming Interface (API): The API provides the core functionality of the Java programming language. The Java platform has two components:  The Java Virtual Machine  The Java Application Programming Interface (API) The general-purpose. and documenting your applications.ArithmeticException: / by zero at DivdeBy0. public class DivideBy0 { public static void main (String[] args) { System.println(10/0).main(DivdeBy0:3) try { statement-list1 } catch (exception-class1 variable1) { statement-list2 } catch (exception-class2 variable2) { statement-list3 } catch The Java Platform A platform is the hardware or software environment in which a program runs. debugging. It offers a wide array of useful classes ready for use in your own applications. It spans everything from basic objects. monitoring. . to XML generation and database access. Every full implementation of the Java platform gives you the following features: Development Tools: The development tools provide everything you'll need for compiling. We've already mentioned some of the most popular platforms like Microsoft Windows.lang.

buttons. The look and feel that means the dramatically changing in the component like JFrame. Java provides an interactive features for design the GUIs toolkit or components like: labels. or to choose among a variety of buttons (JOptionPane. A . to let the user enter text or to choose among predefined options (JOptionPane.showMessageDialog).showConfirmDialog). JDialog etc. Program Organization In the Java programming language. to ask for confirmation (JOptionPane. panels and sliders etc. Swing The Java Swing provides the multiple platform independent APIs interfaces for interacting between the users and GUIs components. text boxes. package. combo boxes. for viewing it into the several types of window. All Java Swing classes imports form the import javax. Each of these methods either returns an int specifying which button was pressed. checkboxes. The java launcher tool then runs your application with an instance of the Java Virtual Machine. JOptionPane Basics Static methods in the JOptionPane class let you easily create modal dialogs to show messages (JOptionPane.Deployment Technologies: The JDK software provides standard mechanisms such as the Java Web Start software and Java Plug-In software for deploying your applications to end users.showInputDialog). JWindow.swing. The Java Swing supports the plugging between the look and feel features. . Those source files are then compiled into . All AWT flexible components can be handled by the Java Swing.*.showOptionDialog).class files by the javac compiler.java extension.class file does not contain code that is native to your processor. it instead contains bytecodes — the machine language of the Java Virtual Machine1 (Java VM). all source code is first written in plain text files ending with the . or a String specifying the option selected. 1.

HARDWARE AND SOFTWARE REQUIREMENT Software Requirements 1: Operating System : Window 7 2: Front End : jdk1.7.0_21 Hardware Requirements 1: Machine : intel i3 core 2: Speed : 2.40 GHz 3: Hard Disk : 320 GB 4: RAM : 3GB OUTPUT LAYOUT .

public class TempratureConvertorNew { public static void main(String args[]) { try { int ch3=0. Réaumur "). switch(choice1) { case 1: int ch1=0. Fahrenheit 2.parseInt(option2).parseInt(option1).showInputDialog("Your Choice: \n1. if(choice11<=3) { switch(choice11) { case 1: . double Tc1=Double.swing.parseDouble(secondNumber).showInputDialog("Enter The Temprature". Kelvin\n"+ "3. Fahrenheit "). String option2= JOptionPane.showInputDialog("Your Choice: \n1. do { String secondNumber= JOptionPane.JOptionPane. int choice11=Integer. int choice1=Integer. Celcius\n2. do { String option1= JOptionPane."In Celcius").SOURCE CODE import javax.

showMessageDialog(null. JOptionPane.JOptionPane. do { .ERROR_MESSAGE). "Temprature In Réaumur". JOptionPane.showMessageDialog(null.To continue\n"+ " 2. break. break. } } else { JOptionPane.showMessageDialog(null.JOptionPane. break. break.JOptionPane."The Temprature In Kelvin =\n"+Tk1+" K".15 ). "Error_Message".PLAIN_MESSAGE).PLAIN_MESSAGE). case 2: int ch2=0.showInputDialog("Press 1.8* Tc1)."The Temprature In Réaumur =\n"+Tr1+" Re".PLAIN_MESSAGE).showMessageDialog(null."You Have Entered Wrong Choice". "Temprature In Kelvin".parseInt(ch11).0). JOptionPane. case 3: double Tr1=(.JOptionPane. } String ch11= JOptionPane.double Tf1=((1. ch1=Integer. "Temprature In Fahrenheit".8*Tc1)+32."The Temprature In Fahrenheit =\n"+Tf1+" F". case 2: double Tk1=( Tc1 + 273. To exit"). }while(ch1==1).

"The Temprature In Réaumur =\n"+Tr2+" Re".JOptionPane. break.55).showInputDialog("Enter The Temprature".parseDouble(thirdNumber)."The Temprature In Kelvin =\n"+Tk2+" K". double Tf2=Double.showInputDialog("Your Choice: \n1."In Fahrenhiet").String thirdNumber= JOptionPane.showMessageDialog(null. } } else { . case 2: double Tk2=( (Tf2+459. if(choice12<=3) { switch(choice12) { case 1: double Tc2=((Tf2-32)*.showMessageDialog(null.PLAIN_MESSAGE).JOptionPane. "Temprature In Réaumur". "Temprature In Kelvin".67)*."The Temprature In Fahrenheit =\n"+Tc2+" C". JOptionPane. break.55 ).showMessageDialog(null. JOptionPane. int choice12=Integer. Réaumur ").parseInt(option2). Celcius 2.PLAIN_MESSAGE). JOptionPane. case 3: double Tr2=((Tf2-32)*.JOptionPane. break. "Temprature In Fahrenheit". String option2= JOptionPane.PLAIN_MESSAGE). Kelvin\n"+ "3.44).

.ERROR_MESSAGE).parseInt(ch13)."Exception Ocurred. "Error_Message".WARNING_MESSAGE). }while(ch3==1).To continue\n"+ " 2. }while(ch2==1).JOptionPane.showMessageDialog(null. ch3=Integer. } catch(Exception exception) { JOptionPane."You Will Exit From Program".showMessageDialog(null..JOptionPane. ch2=Integer. To exit").JOptionPane. break.parseInt(ch12).To continue\n"+ " 2.showInputDialog("Press 1. "Exception". } String ch12= JOptionPane..ERROR_MESSAGE). "Error_Message". } String ch13= JOptionPane. } } } . JOptionPane. To exit").JOptionPane.showMessageDialog(null.\n You Haven't Entered Any value\n Exiting".showInputDialog("Press 1."You Have Entered Wrong Choice".

OUTPUT .