Program for convert temprature and length, JAVA Programming

Public class ConversionProgram {

 public void start() { 

  String userChoice = askConversionCategory();

  while (userChoice.equals("1") || userChoice.equals("2") || Page 2 of 12

    userChoice.equals("3") || userChoice.equals("4") || 

    userChoice.equals("5") || userChoice.equals("6")) { 


   userChoice = askConversionCategory();


  System.out.println("Good Bye!");


 private String askConversionCategory() {


  String prompt = "Select a conversion category, enter \n" +

       "\t\"1\" to convert Length, \n" +

       "\t\"2\" to convert Temperature, \n" +

       "\t\"3\" to convert Initials, \n" +

       "\t\"4\" to convert Date, \n" +

       "\t\"5\" to convert Time, \n" +

       "\t\"6\" to convert Pig Latin, and\n" +

       "\tany other key to quit: ";

  String category = acquireInput(prompt);

  return category; 



 private void processConversionRequest(String userChoice) {

  if (userChoice.equals("1")) {


  } else if (userChoice.equals("2")) {


  } else if (userChoice.equals("3")) {


  } else if (userChoice.equals("4")) {


  } else if (userChoice.equals("5")) {


  } else if (userChoice.equals("6")) {




 private void convertLength(){


 private void convertTemperature(){


 private void convertInitials(){


 private void convertDate(){


 private void convertTime(){


 private void convertPigLatin(){


 private String acquireInput(String prompt){


  String input = Keyboard.readInput().trim();

  return input;



Posted Date: 2/22/2013 4:38:14 AM | Location : United States

Related Discussions:- Program for convert temprature and length, Assignment Help, Ask Question on Program for convert temprature and length, Get Answer, Expert's Help, Program for convert temprature and length Discussions

Write discussion on Program for convert temprature and length
Your posts are moderated
Related Questions
Describe the Superclass in Inheritance ? In this example you start through defining a more common MotorVehicle class. public class MotorVehicle { private String licensePlat

For an assignment I need to write an array program to go along with an instance variable. I keep getting the no main class error when I run my program.

Write a program on clearing Rectangles ? It is also potential to clear a rectangle that you've drawn. The syntax is exactly what you'd expect: public abstract void clearRect

It helps to resolve naming conflicts when different packages have classes with the same names. This also helps you prepare files within your project. As define : package

write a program in java using array and scanner class to generate padovan series

If we have 2 tables like bankcustomer(cid,cname,addr,acc_type) and customeraccount(cid,amount). How to Deposit amount into the given customer account.?

Java expert with tomcat tuning experience needed Project Description: Want a Java expert to fix memory issues with tomcat. I need School java project - Threads Programm

How to Implementing the Cloneable Interface The java.lang.Object class contains a clone() method which returns a bitwise copy of the current object. protected native Object cl

Write the JavaScript code for the Function SumOddNumbers(maxNumber) in which can add non-negative odd numbers up to maxNumber and return their sum. Java Script Code