Purchase Solution

Java: writing and reading numbers in/from binary file

Not what you're looking for?

Ask Custom Question

Write a program to generate 20 random numbers between 1 and 50, write them to a binary file and then read the numbers back from the file to display them on the screen along with the frequency of occurrence of each number in a nice format. Use the Random class in the java.util package for random number generation.

Please go through the scan of requirement, and the program in attachments.

What I need is the help with part of "along with the frequency of occurrence of each number in a nice format" that means if there is repeated number it should indicate it by showing the frequency of it.

Purchase this Solution

Solution Preview

Please find the modified file Program6.java attached as 281680.java, that meets the frequency requirement.

An example run with the modified file.

Random numbers ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.