Please do not give solution in image format thanku A Bunker array is an array that contains the value 1 if and only if it contains a prime number. The array {7, 6, 10, 1} is a Bunker array because it contains a prime number (7) and also contains a 1. The array {7, 6, 10} is not a Bunker array because it contains a prime number (7) but does not contain a 1. The array {6, 10, 1} is not a Bunker array because it contains a 1 but does not contain a prime number. It is okay if a Bunker array contains more than one value 1 and more than one prime, so the array {3, 7, 1, 8, 1} is a Bunker array (3 and 7 are the primes). Write a function named isBunker that returns 1 if its array argument is a Bunker array and returns 0 otherwise. You may assume the existence of a function named isPrime that returns 1 if its argument is a prime 11 and returns 0 otherwise. You do not have to write isPrime, you can just call it. If you are programming in Java or C#, the function signature is int isBunker(int [ ] a) If you are programming in C or C++, the function signature is int isBunker(int a[ ], int len) where len is the number of elements in the array N.B You should answer only in Java code and You may assume the existence of a function named isPrime that returns 1 if its argument is a prime and returns 0 otherwise. You do not have to write isPrime, you can just call it.
Please do not give solution in image format thanku
A Bunker array is an array that contains the value 1 if and only if it contains a prime number. The
array {7, 6, 10, 1} is a Bunker array because it contains a prime number (7) and also contains a 1.
The array {7, 6, 10} is not a Bunker array because it contains a prime number (7) but does not
contain a 1. The array {6, 10, 1} is not a Bunker array because it contains a 1 but does not contain a
prime number.
It is okay if a Bunker array contains more than one value 1 and more than one prime, so the array {3,
7, 1, 8, 1} is a Bunker array (3 and 7 are the primes).
Write a function named isBunker that returns 1 if its array argument is a Bunker array and returns 0
otherwise.
You may assume the existence of a function named isPrime that returns 1 if its argument is a prime
11
and returns 0 otherwise. You do not have to write isPrime, you can just call it.
If you are
int isBunker(int [ ] a)
If you are programming in C or C++, the function signature is
int isBunker(int a[ ], int len) where len is the number of elements in the array
N.B You should answer only in Java code and You may assume the existence of a function named isPrime that returns 1 if its argument is a prime and returns 0 otherwise. You do not have to write isPrime, you can just call it.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)