CSc 3410 – Assign#1

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (4 votes)

Description of program:

You are to write a program name numbers.java. You are to use arrays as your data structure.

Here are some requirements for the program:

  1. The program must prompt the user to enter the amount of groups of numbers he/she wants to generate (must be between 1 and 5)
  2. A group will be made up of two sets of numbers – a subgroup (set) of 5 numbers and another subgroup (set) of 1 number.
  3. The numbers must be randomly generated from the range of 1 – 69 for Sub Group 1 and 1 – 26 for Sub Group 2.
  4. There must  be no repetition of numbers in the same subgroup.
  5. However, if the user wants for example 2 groups, then it is possible for these two groups to differ by only 1 number (so repetition between groups are allowed providing that the 2 groups are not identical).
  6. You are to use arrays to store the groups of numbers.
  7. The program must also prompt the user asking him/her if he/she wants to generate another set of groups of numbers. If answer is “yes” rerun the program. If “no” terminate the program. If “yes” the random generator must start back from time 0.
  8. Sort the numbers in Group 1 in ascending order  for each group.
  9. Then display all of the groups one group per line on the screen in the order of SubGroup 1 followed by the single number in SubGroup 2.


What to turn in:

  1. numbers.java. and any other .java files you created.
  2. numbers.class (or bank.jar) and any other .class files you created.
  3. Print out (hard copies) of all source files.
  4. Please mark your name prominently on the print out.