• Post Reply Bookmark Topic Watch Topic
  • New Topic

Specification - clause  RSS feed

 
zuraidah abu bakar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i get the question likes below. how to solve it. im beginner in java

Question:
1. Specify and implement the following methods with appropriate specifications
(that containing REQUIRES (if applicable), MODIFIES (if applicable) and EFFECTS
clauses):

a. public static int smallValue(int [] arrayNum) that returns
the smallest integer for a non-empty array of arrayNum.
b. public static boolean isPrime (int num) that determines
whether an integer num is prime.
 
Tim Cooke
Marshal
Posts: 4041
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, this looks like homework or at least a question from a book or tutorial. For the purposes of copyright please quote the source of the question.

Secondly, while there are plenty of folks around here who are happy to help you, nobody is going to do your homework for you. Why don't you kick off the conversation by showing us what you've done so far? Then explain to us exactly what problem you're facing right now.
 
Liutauras Vilda
Sheriff
Posts: 4917
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Please show us what have you tried to far. Just to be clear right from the beginning - we don't do people homework here, but rather give some hints.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
zuraidah abu bakar wrote:. . . containing REQUIRES (if applicable), MODIFIES (if applicable) and EFFECTS clauses . . .
Which language is that supposed to be for? MODIFIES, REQUIRES and EFFECTS are not Java® keywords.
And as you have already been asked, please tell us where those questions come from.

And welcome to the Ranch again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!