32,204 Topics
| |
is it possible to have my cellphone send periodic text to another phone stating the location (GPS)? concider: Assume i have lost my phone and would obviously like to have it back. is it possible to design an application that will periodically (automatically say after 60 mins passes) send a … | |
Howdy guys need help changing , from string to a big decimal for my addition method in my calculator , i understand the problem but not the solution . Any help would be great, thanks. public void add() { BigDecimal oneNumber = model.getDisplay(); BigDecimal twoNumber = model.getDisplay(); BigDecimal result = … | |
Hi i am trying to write a search function and the question i have is this, when i do something like this comix[0] = new Comic("book title", "Author", "isbn", 454.24F); for (int i = 0; i < comix.length; i++) { Scanner console = new Scanner(System.in Scanner console = new Scanner(System.in); … | |
hello everyone need help with my program this is a airplane seating program for reservations it's a 2d array of 000 .. and when i take a seat it changs to 1 we have first class supposed to be first 2 rows and rows 3 to 7 are business class, … | |
I want to start as junior in Java in a company but they ask me to present them some tasks that ensures that i am more than a junior.they offer me a task to create a Swing Gui with buttons and stuff.I have already a good knowledge of Java from … | |
Hi all, I'm am very close to finishing my 2 player pool game with only a couple of rules left to add. I am currently trying to assign a ball colour (red or yellow) to the player who pots the first ball. I am at a loss at the minute … | |
I need to design an application that determines and prints the number of odd, even, and zero digits in an integer value read from the keyboard. This is what I have so far. public static void main (String[] args) { int odd=0, even=0, zero=0; Scanner scan = new Scanner(System.in); int … | |
Hey guys, im new to programming, just took my first course in university. I'm currently trying to program a calculator that does multiplication, but its giving me this error: C:\Users\Karim\Documents\Karim.java:9: error: package Java.util does not exist import Java.util.Scanner; And ofcourse followed by a few other related errors. Anyone know how … | |
//**************************************************************************************************** // Project15.java Author: Lewis/Loftus/Cocking // // Write an application that plays the rock-paper-scissors game against the computer. When played // between two people, each person picks one of the three options at the same time and the winner is // determined. The program should randomly choose one of the … | |
Hey guys, im new to programming, just took my first course in university. I'm currently trying to program a calculator that does multiplication, but its giving me this error: C:UsersKarimDocumentsKarim.java:14: error: missing method body, or declare abstract public static void main(String[] args); Anyone know how to fix it? :( import … | |
Hello, I am currently working on a school project and ran into a little bit of trouble. Every time I compile the program I get 2 errors they are: cirlce.java:23: incompatible types found : java.io.IOException required: char letter = get.ioException(); ^ cirlce.java:37: possible loss of precision found : double required: … | |
Modifty the Cash Register Class to create a file containing a sales receipt. The program should ask the user for the quantity of the items being purchased and then generate a file with contents to similar to the following: SALES RECEIPT UNIT PRICE: 10.00 QUANTITY: 5 SUBTOTAL: 50 SALES TAX: … | |
Hi all, i want a simple java code to convert currency to indian rupees...how to proceed? | |
I wasn't able to get any response from my last post, so I'm rewording my question with hope that my question is easier to understand. I need to get a visitors location and display a custom header graphic based on the *Region* returned. For example: I live in Edmonton, in … | |
All, I am using Netbeans 7.2 to build a form. I added a Swing JTextArea to my form and all is well. I'd like to add a titled border to my JtextArea (or the JScrollPane in which it lives) but can't figure out how. I tried Right Click > Properties … | |
I want to modify the Cash Resigter Code below to create a file containing a sales receipt. The program should ask the user for the quantity of items being purchased, and then generate a file with contents below: SALE RECEIPT Unit Price : $10.00 Quantity: 5 Subtotal: $50.00 Sales Tax: … | |
Hey, I posted earlier about arbitrary expressions and I did find solution to that. The question is how do I create random expressions? So far I've created codes to generate random operators and random numbers, how will I generate random expressions? E.g. a1,a2,a3 are variables for random numbers I've assigned … | |
Hello, I am currently writing a card game in Java. My question is when I write the follwoing code below: `Inline Code Example Here` 38 // select a random number between 0 and 51 39 int second = randomNumbers.nextInt( NUMBER_OF_CARDS ); Will the program properly generate 52 cards? Should I … | |
write a Java program that allows the users to enter in any number of non-negative integers, whitespace delimited. The user terminates the list of numbers with a negative integer. The program then should print the average of non-negative numbers entered. | |
I am not to sure what the error is in my code but the order variable does not seem to initialise properly and hence my gui displays the wrong output, for example when cheese,tomato and chicken are selected it only displays Chicken with Tomato Tomato $12.75. Any help will be … | |
I'm totally lost. I have a programming partner and this is what he sent me. I can't get the program to compile. I don't know where to start. Any suggested place to start? package Assignment2; public class TooBigException extends Exception { private static final long serialVersionUID = 1L; public TooBigException(String … | |
This might be a general math question, so excuse me if it doesn't belong here. I have an airplane that flies around the screen. Pressing the W key will make it counterclockwise, and pressing the S key will make it rotate clockwise. When I press space, it shoots bullets. However, … | |
I would like to know what tool/class should I use to create a map that used for games? such example: user use key to move an object...and if moves then the more map will shown ... I admit, I did not do much research on this.. but I wanted to … | |
Problems clearing and adding items to Jlist box. I have a set of 12 items stored in each record of a database. These record items are named as follows: LANGUAGE1 LANGUAGE2 . . LANGUAGE12 I have no problems in accessing the database. rs.getString("LANGUAGE1") and so on.... I need to clear … | |
Hey Guys, Im new to learning java and I am writing a few programs for practice. I cant figure out whats wrong with my code. When i try to compile i get an "error . class expected" Any advice is appreciated, thank you. import javax.swing.JOptionPane; public class TuitionCost { public … | |
I need help with my java code for the game hangman... we are using eclipse to write the game and using three main files to start...hangman.java hangmanlexicon.java and hangmancanvas.java. the first part of the assignment, is to create a ConsoleProgram for the game and this is what i have so … | |
So i have this assignment, > Create a quiz game that displays, in turn five questions about any topic of your choice. All five questions should have the same three possible multiple-choice answers. For example, you might ask trivia question about Australia states for which the correct response is Victoria, … | |
Hi, I'm trying to insert a search function into my program. I used 2 classes class PatientInfo{ private void BAddActionPerformed(java.awt.event.ActionEvent evt) { PatientAddress pInfo = new PatientAddress(); lName = txtLastName.getText(); pInfo.getLName(lName); txtLastName.setEditable(false); } private void BSearchActionPerformed(java.awt.event.ActionEvent evt) { PatientAddress pInfo = new PatientAddress(); lName = txtSearchName.getText(); pInfo.searchInfo(lName); txtLastName.setText(pInfo.lastName); } } … | |
I am new to Java, and I have been trying to get an assignment coded and keep gettin java.lang.NullPointerException in Main Class.java:39. Ok, no prob. Unfortunately I can't quite get this fixed. Any suggestions? I'm using Eclipse Juno. Also, any suggestions on any books, sites, etc that review java in … | |
I am trying to develop a method that can find common elements in a simple array with a linear run time O(n + m). This is an old school problem, i.e., no hashsets, hashtables, arraylists. Here is what I have so far. import java.util.*; import java.util.Arrays; public class CommonElements3 { … |
The End.