Boolean array, JAVA Programming

Assignment Help:
If I have a boolean array that contains 30 elements (boolean[] fish), how do I go about isolating every 10 elements to use for something specific?

Say there are 30 types of fish stored within the boolean array and 0-9 are fish found specifically in the Indian Ocean, 10-19 are fish found specifically in the Atlantic, and 20-29 are fish specifically found in the Pacific Ocean. And for those 10 fish [0-9], [10-19], [20-29], each is a different color (red, orange, green, blue, white, black, silver, yellow, purple and gold), where the colors and locations of the fish are enum types Colors and Locations.

How do I go about appointing those characteristics to the fish?

Ex: elements [0-9] are fish from the Indian Ocean and [0] is red, [1] is orange, [2] is green, [3] is blue, [4] is white, [5] is black, [6] is silver, [7] is yellow, [8] is purple, and [9] is gold.

elements [10-19] are fish from the Atlantic Ocean and [10] is red, [11] is orange, [12] is green, [13] is blue, [14] is white, [15] is black, [16] is silver, [17] is yellow, [18] is purple, and [19] is gold.

elements [20-29] are fish from the Indian Ocean and [20] is red, [21] is orange, [22] is green, [23] is blue, [24] is white, [25] is black, [26] is silver, [27] is yellow, [28] is purple, and [29] is gold.


Will I need to appoint those characteristics in the constructor after initializing fish = new boolean[30]?

Related Discussions:- Boolean array

Explain about the dynamic java, Dynamic JAVA Class and type informatio...

Dynamic JAVA Class and type information is kept around at runtime. This allows runtime loading and inspection of code in a very flexible way.

Why hub is used in networks, Why hub is used in networks? Hub is networ...

Why hub is used in networks? Hub is networking equipment and a device that connects various computers to form a network. In a network the NIC translates the message within elec

Program, a program that groups items according to their number

a program that groups items according to their number

Write an aspect that counts different kinds of method calls, Problem statem...

Problem statement Part 1 Write an aspect that counts different kinds of method calls in a Java program. Your aspect should meet the following requirements:  The aspect should ma

Data structures programming, Colossus has just purchased a computer for it...

Colossus has just purchased a computer for its new automated reservation system. You have been asked to program the new system.  You are to write a program to assign seats on ea

Object and Instance, What is the difference between instance and object of ...

What is the difference between instance and object of a class? Few says both are same, then why java kept both the words for same thing?

Data types in javascript, A value, the data assigned to a variable, may con...

A value, the data assigned to a variable, may contain any sort of data. Though, JavaScript considers data to fall into many possible types. Based on the type of data, certain opera

Want a page to store emails when click as save, Want a page to store emails...

Want a page to store emails when click as save, then pass along to another page with the emails in the URL Project Description: I have a page that populates with listing; the

A session facade? , Too many function invocations between the server and th...

Too many function invocations between the server and the client will lead to network overhead, tight coupling due to dependencies between the server and the client, misuse of serve

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd