Purchase Solution

C# and Java progs. Random generator and eliminate duplicates

Not what you're looking for?

Ask Custom Question

1. Write a C# application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers. Every 10th number you should display a String consisting of any phrase of your choice concatenated with the current random number.
A possible partial output for your program is shown below:
101
899
234
823
239
099
460
382
534
This 10th number is: 834

Demonstrate your code compiles and runs without issue. (You can use screen captures to demonstrate this functionality in a word document).

2. Submit your java file together with a text file containing your test data. Test data in this case is simply a list of inputs and corresponding outputs of your test program.
(Eliminating duplicates) Write a method to eliminate the duplicate values in the array using following method header:
Public static int [ ] eliminateDuplicates (int [ ] numbers)
Write a test program that reads in ten integers, invoke the method, and displays the result.
Here is the sample run of the program:
Enter ten numbers: 1 2 3 2 1 6 3 4 5 2 Enter
The distinct numbers are: 1 2 3 6 5 4

Purchase this Solution

Solution Summary

Provides steps to create both C# and Java applications.

Solution Preview

Attached you will find following files:

C# Task:
Program.cs - C# source ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

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.

Javscript Basics

Quiz on basics of javascript programming language.

C# variables and classes

This quiz contains questions about C# classes and variables.

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.