Home Answers Viewqa Java-Beginners java input problem

 
 


Ashraf
java input problem
1 Answer(s)      5 years and 3 months ago
Posted in : Java Beginners

I am facing a Java input problem

View Answers

June 30, 2012 at 12:41 PM


QUESTION 1

You are required to write an application called Customer Billing System. This system will calculate water usage charges for a month that has been imposed by Syarikat Air Melaka Berhad. This system will categorise users into residential users and industrial users and calculate the charges based on data entered by the user. Data needed are the type of customer (Residential or Industrial), past meter reading and current meter reading.

Given the charge rate as follows:

For Residential: 0 ? 15 m3 : RM 0.82 every m3 15.1 ? 40 m3 : RM 0.65 every m3 40.1 m3 and above : RM 0.42 every m3 Minimum charge is RM 5.00

For Industrial: 0 m3 and above : RM 1.47 every m3 Minimum charge is RM15.00

Instruction: The above application must be able to hold information for up to 5 customers. Use an array and repetition structure to store information about users such as type of customer, past meter reading, current meter reading and charges. Write a structured Java program to develop the above system by following the steps below:

a) Prompt the user to input the type of customer, past meter reading and current meter reading. Next, get the difference between current meter reading and past meter reading. b) Separate them as either R/r for Residential or I/i for Industrial. You can use any one of the two selection structures. c) Calculate the charges based on rates given above. If there is no water consumption, the minimum charge will be imposed. You can use any one of the two selection structures. d) Display information about the type of customer, past meter reading, current meter reading and charges for each customer. Print the information in table format.









Related Pages:
java input problem - Java Beginners
java input problem  I am facing a Java input problem
input
input  a java program that will exchange the last names of two students that were input by a user
Dialog Box Input Loop
Prev: Example: Capitalize | Next: Java NotesDialog Box Input Loop Indicating end of input with cancel or close box, a special value, or empty input... from the input. This may not be a problem in many cases, but it can
JAVA Problem
JAVA Problem  Write a program that takes two parameters 1. a word... in the array. For Example: INPUT word="ravi" word_array = ["Chethan Bhagat...) { Scanner input=new Scanner(System.in); System.out.print("Enter word
input box
input box  give me the code of input box in core java
input box
input box  give me the code of input box in core java
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
input output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part... DataInputStream A data input stream is use to read primitive Java data types from
Java Problem - Java Beginners
Java Problem  Write a program 2 input a positive integer n and check... series i.e. 2 3 5 7 11 13 17....... For eg. ---> if input is 11..., Code to solve the problem : import java.io.*; public class PrimeNumber
problem
problem  Hi, what is java key words   Hi Friend, Java Keywords are the reserved words that are used by the java compiler for specific... information, visit the following link: Java Keywords Thanks
problem
problem  hi'sir mai niit student hu.mujhe java ka program samaj me nhi aata mai kya karu and mai kaise study karu please help me.   Learn Java from the given link: Java Tutorials
JAVA Problem - Java Beginners
JAVA Problem  please help me!!!! How can i code in java using Two... 109 120 Method to input data from the data file Method to display.... can create methods for the input, for the output, for the average
java problem - Java Beginners
java problem  Write a program to model a simple calculator. Each data... operation. doNextOp has three input parameters (the operator, the left operand.../java/example/java/swing/calculator-in-swing.shtml Thanks
code problem - Java Beginners
java script j2ee j2me sql plz help me to sort out this problem. thnx  ...code problem  Dear sir, I'm havin a problem that suppose i've got a file that contains the following lines- java java script j2ee php sql
Java Command Line Input
Java Command Line Input  How to get input from command line in java... System.out.println("Please Input A Number"); BufferedReader br... this code you will find the output as Please Input A Number 2 data is- 2
java problem - Java Beginners
java problem  Write a program that could be used to help children... an answer for each. After user has input each answer, the program then display... of such a program. The user input is shown in boldface. How many problems would you like? 3
java problem - Java Beginners
java problem  a) Binary numbers is important in computers. Binary... available in Java that will allow us to convert from denary integer (base 10... (bits) ; } } public static void main(String args[]){ Scanner input=new
different type input in java
type of input method. thank   Java Read through DataInputStream: import...); } }   Java read input through Scanner: import java.util.*; class...); } }   Java read input through BufferedReader import java.io.*; public class
problem in database
problem in database   thanks for web site. I want change this code...="java" import="java.sql.*" errorPage="" %> <!DOCTYPE html PUBLIC "-//W3C...; <input type="text" name="empid" /> </label> <
input - Java Beginners
me soon.  Hi Friend, There are lot of ways to input data.You can use... to input the data from the command prompt. Try the following code to input name...:"); Scanner input=new Scanner(System.in); String name=input.nextLine
code problem - Java Beginners
code problem  Dear sir, my problem is given below: suppose a file...; Hi friend, Code to help in solving the problem : import java.io.... InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader
problem 1 - Java Beginners
problem 1   Hi, please help me!!!! How can i code in java using.... this is my input data file: 88 90 94 102 111 122 134 75 77 80 86 94 103 113 80.... Method to input data from the data file Method to display the table
query problem
. <%@page language="java"%> <%@page import="java.sql.*"%> <table... = st.executeQuery(query); while(rs.next()){ %> <tr> <td><input type
Java User Input
Java User Input  I am using Scanner class for user Input. Scanner s = new Scanner(System.in); String name = s.next(); but i am unable to store full name in name variable...how i can store full name plsss reply   use
code problem - Java Beginners
.  Hi friend, Code to help in solving the problem : public... { // quick way to do input from the keyboard, now deprecated... java.io.StreamTokenizer Input=new java.io.StreamTokenizer(System.in
code problem - Java Beginners
; Hi friend, Code to help in solving the problem : import java.io.... (br.readLine()); count++; } //Close the input stream in.close... in Java visit to : http://www.roseindia.net/java/example/java/io/ Thanks
program problem - Java Beginners
program problem  Design and write a Java application that takes as input a single letter and displays the corresponding digit on the telephone. The letters and digits on a telephone are grouped this way: 2 = ABC 4 = GHI 6
input output in java
input output in java  java program using filereader and filewriter   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args) throws
code problem - Java Beginners
{ public static void main(String args[]) { try{ InputStreamReader input...(input); System.out.println("Please enter line number."); String string...()); } } } Dear sir, my problem is that suppose i enter line number: 3 if line
Java I/O problem
Java I/O problem   Write a Java application that prompts the user to input their Name, Address, Date of Birth and Student ID number using the standard input - this information should then be saved to a file named studentData
GUI problem - Java Beginners
GUI problem  how to write java program that use JTextField to input data and JTextField to display the output when user click Display Button??  Handle the actionPerformed event for JButton and try doing something like
Bid Problem - Java Beginners
Bid Problem  Write a 'for' loop to input the current meter reading... in this application explain in details : Code to help in solving the problem...!"); } } } For more information on Java visit to : http
Java code problem
Java code problem  Please check the errors,if any,in this code...i am a java beginner import java.util.ArrayList; import java.util.Calendar...(); if(p==null) System.out.println("Incorrect input"); else patients.put
logout problem - Java Beginners
; <td width="50%"><input type="text" name="...;</td> <td width="50%"><input type="...; </tr> </table> <p><input type="
Grid Problem - Java Beginners
user input in form) form also . 6:- user click the next button then grid open
Input in Stateless Bean - EJB
Input in Stateless Bean  Hello, I am having problem in taking the input in stateless bean, when I am trying to get integer or double type input from the user in the client file, It shows me the error
Compressed (ZLIB) Input Stream
Compressed (ZLIB) Input Stream  I have to make call to a web service which will send a compressed (ZLIB) stream back to me. I have to de-compress the same stream and use it further. My problem is that I have to get it done
Data input & output Stream
Data input & output Stream  Explain Data Input Stream and Data Output Stream Class.   DataInputStream and DataOutputStream A data input stream lets an application read primitive Java data types from an underlying input
java user input - Java Beginners
java user input  how to input from keyboard? please give a example.  Hi Friend, There are lot of ways to input data from keyboard.You...:****** try{ System.out.print("Enter String:"); BufferedReader input = new
Keyboard Input
Java NotesKeyboard Input There are two approaches to getting keyboard input from the user. GUI (Graphical User Interface). Displaying a graphical text... simple keyboard input, eg, something like C++'s cin. Java 5 (introduced
Java Big Problem - Java Beginners
Java Big Problem  Input the current meter reading and the previous..., Code to solve the problem : import java.io.*; import java.text.*; public... on Java visit to : http://www.roseindia.net/java/ Thanks Vineet
Input and Output package
Input and Output package  Hi guys, My professor used input and output... she used in.readint() out.writeln() commands to read input and print output. she created two new objects directly to use this statements. /* input and output
user input in java - Java Beginners
user input in java   i am trying to write a code to compute the average of 5 numbers but i dont know what to do for the program to accept user input  Hi import java.util.*; public class AverageExample { public
Input And Output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part of java.io... DataInputStream A data input stream is use to read primitive Java data types from
Input / Output in Easiest Method in Java
Input / Output in Easiest Method in Java  How to input from keyboard... with the easiest method in Java?   Hi Friend, Try the following code: import...)throws Exception{ Scanner input=new Scanner(System.in
calculation after if. user input
user input????   My apologies good evening peoples Once again I am... not to use loops yet) the problem is at the end of picking my products...[]args){ Scanner input=new Scanner(System.in); System.out.print
button to accept user input
the radiobutton and spinner.The user input does not show on my Studentinfo.mdb database it just gives me an error.please help   Here is java swing example... SwingExample(){ JFrame f = new JFrame("Frame in Java Swing"); f.getContentPane

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.