Dan Good

Ranch Hand
+ Follow
since Feb 02, 2014
Dan likes ...
Eclipse IDE Java Windows
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dan Good

Hey guys, haven't posted in a while, but my programming instructor asked us to take a class and implement a "try, catch" block to catch an exception. Here's the question:

Modify the findBestPaid method in the Company class to catch an InputMismatchException (or NoSuchElementException, if the line in the file has a name and an int for hours worked, but no pay rate).

I added a try/catch block, but I'm getting some issues, and I can tell my block is not written correctly.



Let me know if you can help me out!
7 years ago
Thank god. it works now. I both hate you and love you for sticking this out with me for the past 5 hours. You just got this Marine his next rank for bootcamp in 20 days. I needed to pass this last class so I could have enough credits to rank up for the summer. PFC. Thank you!
7 years ago
The console for me to type in does not pop up. Literally nothing happens. First time I have ever seen this. Doesnt say error or anything. Does it work for you?
7 years ago
Im su\using Eclipse IDE. There are no bugs. i hit run and nothing happens.
7 years ago
How would I correct that? Please it's 0422 right now and I have to get some sleep at some point. I just need this done.
7 years ago
So like this?



It's clean of bugs but won't run
7 years ago
Yes

7 years ago
Here is original:



And here is what I have so far:

7 years ago
When I change the printbinary at the very bottom back to 25, it gets messed up because I need that value to be input by the user, so I put it as "binary", since binary was defined by the user
7 years ago
Only bugs on lines 13 and 17.

7 years ago
Can you show me how to write those lines of code then? I swapped the term number with binary and only got more bugs. I can't put these ideas into code, I keep looking at it feeling fried.
7 years ago
See that's the problem: I did read through it, and if anything, it made me feel more overwhelmed. It's hard for me to connect the tutorial to what I'm doing because for one, I barely understand what I'm doing and the tutorial's context is separate from my issue, so I can't bridge the two mentally. I'm just struggling to follow this concept :/
7 years ago
Do you mind showing me? I feeling like I'm just gutting this and digging a deeper hole.
7 years ago
Like this?

7 years ago
I'm not exactly sure how to go about doing that. A friend of mine asked me to change this code sequence so that it would accept user input rather than the stated number. Kind of new at this

Here is the original from:

http://www.java2novice.com/java-interview-programs/decimal-to-binary/

7 years ago