Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need Java Program

Posted on 2011-09-13
7
Medium Priority
?
316 Views
Last Modified: 2013-11-24
If there's anyone out there familiar with Java, I am in serious need of some help. I need a program that does a few simple tasks. It must ask the user for an input file. The input file I am using is a basic txt file that has 100 integers. These integers range from -9 to 9 including 0. Then it must calculate and display the mode (the integer that occurs the most.) If possible, I'd like it to have at least one method that it calls upon somewhere in the program. And that's it. Hopefully someone can help. Attached is the txt file I am using. We were told, if done correctly, this code can be written in 15-20 lines, so I can't imagine this being complicated.  Lab0-input.txt
0
Comment
Question by:Nox_31
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36531631

>we were told

Is that a some kind of academic assignemnt ?
0
 

Author Comment

by:Nox_31
ID: 36531643
It's a hw assignment for a programming class.
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36531656

At EE we are not allowed towrite the programs for your accademica assignemnt
Try to write some draft - we can help you to improve it
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Nox_31
ID: 36531668
I'll take my business elsewhere then, thanks.
0
 
LVL 10

Expert Comment

by:gordon_vt02
ID: 36538607
If you're not planning on doing the work, get out of the class.  As a professional developer, I don't want you anywhere near my code or anyone else's if you can't/won't learn how to do it yourself.
0
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 2000 total points
ID: 36555588
Agreed with for_yan and gordon_vt02. But you can use the given hint and reference.


1. Read your file and store the data in an Array (Refer http://www.roseindia.net/java/beginners/java-read-file-line-by-line.shtml)
2. Calculate Mode based on the values stored in an Array (http://stackoverflow.com/questions/4191687/how-to-calculate-mean-median-mode-and-range-from-a-set-of-numbers)
0
 

Author Comment

by:Nox_31
ID: 36555647
It's an elective course it's totally optional. As a professional smart ass, I pay close attention to detail and no where in my post does it say anything about having someone else write the code...it simply asks for help. Which has been given to me by amit. Thank you. Issue has been resolved. Case closed.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question