[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

Need Java Program

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
Nox_31
Asked:
Nox_31
1 Solution
 
for_yanCommented:

>we were told

Is that a some kind of academic assignemnt ?
0
 
Nox_31Author Commented:
It's a hw assignment for a programming class.
0
 
for_yanCommented:

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Nox_31Author Commented:
I'll take my business elsewhere then, thanks.
0
 
gordon_vt02Commented:
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
 
Amitkumar PSr. ConsultantCommented:
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
 
Nox_31Author Commented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now