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 code and document bases, Explain Code and Document Bases ? If ...

Explain Code and Document Bases ? If you don't know the exact URL of the image, but you do know its name and in which it's in the similar directory as the applet, you can use

What is jms consumer, JMS consumer is a JMS client that receives messages.

JMS consumer is a JMS client that receives messages.

What is jms client, An application or procedure that produces and/or receiv...

An application or procedure that produces and/or receives messages.

I want java swing desktop audio video chat server, Project Description: ...

Project Description: We have a project on hold to complete a due task of a Java swing desktop audio and video server. The admin panel and other features are already implemented.

Java program to calculate the commercial value of the stamps, You are asked...

You are asked to write a Java program to calculate the commercial value of the stamps owned by a philatelist. Each philatelist has a name and a collection of stamps. The stamps can

Explain pop, SMTP (Simple Mail Transfer Protocol) permits two mail servers ...

SMTP (Simple Mail Transfer Protocol) permits two mail servers to communicate using a easy language, and gives a step-by-step protocol for exchanging information. SMTP delivers m

Write down html or javascript code to declare array, Write down HTML or Jav...

Write down HTML or JavaScript code for the following requirements: Declare an Array along with the identifier SUBJECT having length 5. Assign subsequent values to the array par

Unix-like CLI in Java (simple), The assignment is implementing a CLI in Jav...

The assignment is implementing a CLI in Java with several usable commands, using Threads.

Determine the term- java is for real, Java Is For Real Java has a lot o...

Java Is For Real Java has a lot of hype however much of it is deserved. Java is very well matched for many modern problems Using more CPU time and memory but less programmer

Explain difference between an if and a switch statement, What is the differ...

What is the difference between an if statement and a switch statement? The if statement is used to select between two alternatives. It uses a boolean expression to decide whi

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