66 Topics

Member Avatar for
Member Avatar for VengefulToast

Will someone please tell me why I keep getting my custom file not found exception? The file is spelled correctly and is in the same directory of my java file. I am programming on Eclipse on Mac OS X. Here is my source: // Dillon Sheffield // Lab 10a // …

Member Avatar for VengefulToast
0
269
Member Avatar for AMeddaugh

My Java teacher hasn't been very clear, and i'm kind of flying solo here. He gave us this project, and one part of the project is throwing up a JOptionPane which allows the user to input a number which correlates to a specific car. For example [QUOTE]Choose a vehicle that …

Member Avatar for AMeddaugh
0
146
Member Avatar for LogicalOutlier

This program determines the grade average, raised grade average, of individual students and all students. The program takes scanner input. In the scanner, the number of students, the number of grades for each student, and the grades of each student are entered. Ultimately, I need to print out each student's …

Member Avatar for hiddepolen
0
2K
Member Avatar for LogicalOutlier

[CODE]public class Grades{ public int scoreTotal; public int numScores; double average; static String file = "randomNumbers.txt"; int lowest; int x; int temp; public static void main(String[] args) throws FileNotFoundException{ int scoreTotal = 0; int numScores = 0; double average = 0; int lowest = -1; int temp = 0; Scanner …

Member Avatar for NormR1
0
189
Member Avatar for JavaPrograms

My task is to: Pick 10 of my favourite NBA or NHL players from 2 top teams and display the player name, team name, points, rebounds, and assists for each of them. I then have to store this information as a table in a .txt file (This part is completed). …

Member Avatar for David Kroukamp
0
415
Member Avatar for MichaelDrew

We have all seen the commercials for the NeatDesk Scanner, promising to organize all of your old receipts, business cards and documents by making a searchable database of them. I personally am always skeptical of any “as seen on TV” product, but this is a product my wife has actually …

0
572
Member Avatar for dark_sider_1

Hi there, It's been a long time since I've used delimiters in the Scanner class in Java. If I wanted to have any numbers between an expression, such as xx/xx/xxxx or an infinite amount of numbers between them with just the forward slashes as delimiters, what would the syntax be? …

Member Avatar for JamesCherrill
0
212
Member Avatar for nofanman4311

I need some help with this. For my class I have to make a game called hexo, basically "Hexo is a game loosely based on the television game show Lingo. Rather than trying to guess 5 letter words (as in Lingo) the Hexo player will have sixteen tries to guess …

Member Avatar for CSloan7597
0
153
Member Avatar for CKShia

I am writing a simple program to get user input from Scanner to perform some tasks, I want to get user input only from the number 1 to 3, any negative number or string will display an error message and prompt user to re-enter. Here's comes the problem... When I …

Member Avatar for JamesCherrill
0
260
Member Avatar for kweigand

I am creating methods that will extract info out of a text file. The program is for a real estate office manager who needs to run reports on property listings. The text file will contain property number, property type, price, and agent id as follows. [CODE]110001 commercial 500000.00 101 110223 …

Member Avatar for ~s.o.s~
0
668
Member Avatar for RM@Bowdoin

I implore you to ignore the poor formatting, ignore the overall functionality even; my problem lies with trying to call the Scanner scan within flow method from readBoolean and readBoolean2D methods. It says it cannot find variable scan. How can I access this variable? [CODE] import java.util.*; import java.io.*; public …

Member Avatar for ~s.o.s~
0
334
Member Avatar for BaldingEar

Hi guys. I am getting the error: LoanProgram.java:17: variable payment might not have been initialized payment = getPayment (amount, rate, years, months, payment); I am stumped, and the lab is due tomorrow. If anyone could help me out I would greatly appreciate it. :) I'll put an asterisk on the …

Member Avatar for BaldingEar
0
330
Member Avatar for Kerry W

HP announced this morning a new printer that’s the first of its kind: the TopShot LaserJet Pro M275. What makes this printer different? Of course it has the usual scanning feature that the HP LaserJet’s have featured for years, but with a new spin, 3D scanning. The TopShot doesn’t have …

Member Avatar for Kerry W
0
237
Member Avatar for ARaza110

Can someone help me please. I am using a Scanner Class and want to count characters entered in the textfield. Unfortunately, backspace and any key (Ctr,Alt,Capslock) for that matter is counted as a character and that increments the counter by 1. Here is the code [code] String ab="^[A-Za-z0-9]+$"; public void …

Member Avatar for ARaza110
0
675
Member Avatar for hwalsh

I'm having an issue that I've been working on most of the day. I want to get the user name, then return it twice, but can't seem to get the variable right. Here is my code. [CODE]import java.util.Random; import java.util.ArrayList; import java.util.Scanner; public class mlab { // instance variables - …

Member Avatar for FALL3N
0
342
Member Avatar for Tremillian

I took an intro python class and learned some about jython. Unfortunately, what I have in mind is far too complicated for my level of training. Is it possible to use jython to import pictures from a scanner? If so, what module would I start with/use? The scanner is an …

Member Avatar for FALL3N
0
130
Member Avatar for WASDted

Hewlett Packard has been synonymous with ‘quality printers’ for decades, but these days a printer is not just a printer anymore. We expect more and more is what you get with the HP Officejet Pro 8500A Plus, a new multi-function machine and member of HP’s ePrint family. We reviewed it …

Member Avatar for Dani
1
451
Member Avatar for Oddone

This is basically to request help with my program, as was already evident. I am a student, and an assignment asks me to "Write a method that computes the spherical distance between two points on the surface of the earth, given their latitudes and longitudes." I have written this so …

Member Avatar for Oddone
0
162
Member Avatar for DarkLightning7

I cant seem to find the problem with this program I am building as a learning exercise. I am getting errors referenced to extremely simple pieces of code. In the output the first thing that should be printed is the random double number that the program selects then it should …

Member Avatar for DarkLightning7
0
261
Member Avatar for Geowil

[code] //Address Book Part 1 //IT 215 //George Williams import java.util.Scanner; class menuOperations { //Initilize Arrays to store information String[] fNames = new String[5]; String[] lNames = new String[5]; String[] dAddress = new String[5]; String[] dCity = new String[5]; String[] dState = new String[5]; int[] dZip = new int[5]; int[] …

Member Avatar for masijade
0
467
Member Avatar for curbster

Hi all, I am in my first Java class at the local community college but my class is online and my teacher takes DAYS to respond via email. I need some help with my homework and thought I would try here. I'm not looking for someone to give me the …

Member Avatar for curbster
0
880
Member Avatar for flyingcurry

The below method is for my database assignment, and we are supposed to check if the "username" the user adds is already in the database. Somehow "newRecord.username = sc.nextLine();" this line does not work, the second time through the do-while loop It seems like it just ignores the line or …

0
168
Member Avatar for Rally VW

The code I'm writing reads in something like this from a file: 95 34 89 100 25 100 84 62 78 98 Mary Elizabeth Smith And outputs this to the same filename with a different extension: 88.25 Mary Elizabeth Smith I wrote a test program to test the calculation methods …

Member Avatar for Eric Cute
0
197
Member Avatar for Learning_Curve

I am currently working on an application for use with scanning an printing devices. I use the ManagementObjectSearcher in order to retrieve device names and Id's: For example using (Don't forget to add the reference to System.Management.dll in the framework 2.** folder if you're trying the code) [CODE] Dim searcher …

Member Avatar for AndreRet
0
391
Member Avatar for adaniel058

I can not figure out why my code is reading in data to my vector in funny ways. I have added the input file and necesary class to test. It seems to be skipping values in the input file and also adding things to seperate places in the vector instead …

Member Avatar for kramerd
0
228
Member Avatar for boos800

I'm beginning a program that needs to read a file given in the command line. My first question is, if my command line looks like: $java mysimulator 5 proc.txt And I want to use proc.txt, which args[i] is it? Right now I'm assuming that the class name is args[0] and …

Member Avatar for boos800
0
4K
Member Avatar for nix_xin

[CODE]import java.util.*; public class sSfive { public static void main ( String[] args ) { Scanner nix = new Scanner ( System.in ); System.out.print ( "Enter interest rate: " ); float inInt = nix.nextFloat; System.out.println ( "" ); System.out.print ( "Enter number of year: " ); int inYear = nix.nextInt; …

Member Avatar for NormR1
0
174
Member Avatar for nix_xin

[CODE] import java.util.*; public class sSone { public static void main ( String[] args ) { Scanner scan = new Scanner ( System.in ); System.out.print ( "Enter an integer number from 0-128" ); int inInt = scan.nextInt [/CODE] PURPOSE: program that receives an integer number from 0-128 and displays the …

Member Avatar for Akill10
0
137
Member Avatar for nix_xin

(BEGINNER) problem: i need a program that reads a 4 digit integer and adds all the digits in the integer. example: input=1234, output==10

Member Avatar for nix_xin
0
318
Member Avatar for ans025

Hello I am very new to Java and I really don't know exactly what I am doing. I know a little bit of other programming languages so I'm trying my best to figure it out for myself but I am supposed to: [B]Write a Java Application which will read a …

Member Avatar for NormR1
0
1K

The End.