hj
Type: Posts; User: Helplessdrowningpuppy
So I'm creating a class which when given three inputs uses them as sides of a triangle and tells ther user what type of triangle it is, or if the input is invalid, tells them why it is invalid. I'm...
Yeah its part of my assignment, we were supposed to read the values from the input file that would fit into the array, and keep a tally of all the values processed so we could output to the console...
We run this program twice with different input files, one of length 6 and one of length 19, but we have to use an array size of 15, to get us used to dealing with partially filled arrays. I used the...
I thought it was that but it turned out I had to put something in for the hasNext() clause. I added a trash variable to hold my input for when it didnt fit the if clause and I got it to work.
...
So I'm working on a program that so far
1) reads a set of numbers from an input file, puts them into an array. The array length is a constant number, but the input file (I run the program twice...
Not an error in that sense, I'm not getting any error messages, I meant something wrong in my loops logic.
--- Update ---
My prof emailed me back, I had a semicolon at the end of my for loop....
I changed the code a bit, it is writing to the output file now but its still only processing the first line of information. I tried printing controlvariable and it prints as 10 so the loop...
My book for my intro comp sci course is
http://www.amazon.com/Starting-Out-Java-Control-Structures/dp/0132855836
it eases you into the api step by step and the programming assignments are really...
So I'm trying to read 11 values from a text file, each value on a separate line. The first value I use as loop control to run through calculations on the other ten and finally output both the numbers...
I was tired to the point of mild retardation making this thread, dicdic helped me out with something obvious, so ty, I have another question related to this same program but I'll start a new thread...
I'm sorry if the thread title is misleading I solved my initial problem but ran into another one. I'm having some kind of weird problem reading input from a file. It says that my scanner object I'm...
I fixed up the code for readability, my prof has weird formatting guidelines. The problem still remains that the file isnt being found though. I've tried deleting it and creating a new one with no...
Thank you for the tip on the try catch construct, I thought because the file obviously existed I didn't need to put anything in for exceptions but I guess not. When I compile the program now though...
So my assignment is to read these values from an input file which I previously created. The 10 values represent miles traveled and I convert them using some formula my prof gave me to get the total...
So in the code below I create an instance of my own triangle class and use one of its methods. The thing is I use one of my triangle classes methods in a method other the main method of my main...
So my assignment is
1)To create file and output ten numbers to said file.
2)To read as input the numbers in the file and output the # of numbers, average, and total sum
3)Output results to the...
solved.. ty
So this is first post, I'm new to programming in general and am starting with java, using Jrasp as an IDE.
I was putting together code for my neice as a cool display of my skills lol when I ran...