Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java input problem

Have Programming Question? Ask it here!
 
 
 


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


I am facing a Java input problem


Advertisement
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 Tutorials/Questions & Answers:
java input problem - Java Beginners
java input problem  I am facing a Java input problem
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
Advertisements
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
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
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
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
input
input  a java program that will exchange the last names of two students that were input by a user
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
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
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 problems - Java Beginners
Input and Output problems  1) what is Difference between... to a particular platform. Thus, this class reads characters from a byte input stream.... This link will help you. http://www.roseindia.net/java/beginners
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
Java get User Input
Java get User Input       In this section, you will learn how to get the user input from the command prompt. We are providing you a java application
Validation on input xml in java program - XML
Validation on input xml in java program  Hi.. i am accepting xml data as input which I have to use in my program. i have to validate this input xml against some schema using xml beans and NOT by using sax or dom parser. I am
Java Input/Output Examples
Java Input/Output Examples In this tutorial you will learn about how the Inputs and outputs are managed in java. To understand the Java Input & Output there is a package in java named java.io which provides the classes
java Problem
java Problem  I want to create a binary tree for displaying members in Downline. i am creating a site for MLM(Multi-Level MArketing). tree must be dynamically populated from database. is there any help for me. Thanks in advance
How to get the unicode of japanese character input in java
How to get the unicode of japanese character input in java  Good Evening sir/madam; I am trying to create an application in java which needs to show the japanese character on frame and need to get the japanese string from
input ang message box - Java Beginners
input ang message box  can you help me to calculates for the sum, difference, product and quotient of the two inputted values using Input Dialog...("Input First Number"); int num1=Integer.parseInt(input1); String input2
Command Line Standard Input In Java
Command Line Standard Input In Java In this section we will discuss about the Java IO Standard Input through Command Line. Standard streams, feature of various O/S, are read through standard input in Java. Standard streams are read
blank space in input field - Java Beginners
blank space in input field  I retrieved the fields from my mysql table...If the field contains null value i want to display a blank space in input field(text box)..but i am displaying null how to overcome this.. u r help
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
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
resolution problem in java
resolution problem in java  I designed project in java in my PC when run the same project in some other PC i can't fully view my java forms.Some said that it is resolution problem
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
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
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
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... to power of right operand) q quit Your calculator should display the accumulator
java programming problem - JDBC
java programming problem  Hi, Request you to provide the source code in Java for the following programming problem : upload .csv file data into oracle database. please send the solution to raichallp@yahoo.in
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
Problem in uploading java application
Problem in uploading java application  I have uploaded my java application (folder created under webapps) using Filezilla FtpClient.Application... this problem
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
Java problem - Java Beginners
Java problem  what are threads in java. what are there usage. a simple thread program in java  Hi Friend, Please visit the following link: http://www.roseindia.net/java/thread/index.shtml Thanks
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
for a problem in coading - Java Beginners
for a problem in coading  what is the problm in following coading...(String[] args) { mywindow (); } }   Hi Friend, There is no problem... mywindows.java Run : java mywindows Thanks RoseIndia Team
Multiplication problem - Java Beginners
Multiplication problem  I am facing a peculiar problem in java regarding a multiplication. Please see below: 19300 * 0.001 = 19.3 19400 * 0.001 = 19.400000000000002 (why is this ??) 19500 * 0.001 = 19.5 Can anybody help
Java problem - Java Beginners
Java problem  I have an image in my application and I need to restrict the image path view on the browser. Noone should be able to right click and see the image path. Please help
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
Java Problem - Java Beginners
Java Problem  How to create executable file of a java program.That is steps to create a Jar File of a Java Program  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class
java problem - Java Beginners
java problem  Suppose list is an array of five components of the type int.What is stored in list after the following Java code executes? for (i = 0; i < 5; i++) { list[i] = 2 * i + 5; if (i % 2 == 0) list[i] = list[i
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 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
Java Problem - Java Beginners
Java Problem  How to create a jar file of a program  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class CreateJar { public static int buffer = 10240; protected void
java problem - Java Beginners
java problem  Hotel.java This file declares a class of object which maintains a collection of Room objects. It will contain methods which enable... from a small Java program
java problem - Java Beginners
java problem  Room.java This file defines a class of Room objects. The objects have the following instance variables:  number of beds in the room... from a small Java program. HotelMain.java The aim of this class is to provide
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
Problem on JAVA Programme
Problem on JAVA Programme  public class AA { int add(int i) { int y = i; y += 20; if (y <= 100){ y +=30;add(y);} System.out.println("Final Value of y : " + y); return y; } public static void main
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
JAVA CLASSPATH PROBLEM
JAVA CLASSPATH PROBLEM  hi all Friends I am stuck using the java servlets and problem raise for classpath. I had a problem with servlet to call... that it didn't found any java class (which is java class calling from servlet). but i
 

 

 

DMCA.com