subject

2. The following is a function: FUNCTION findmax(score)
length <- len(score)
maxvalue <- score[0]
FOR n <- 1 TO length - 1
IF score[n] > maxvalue
maxvalue <- score[n]
ENDIF
ENDFOR
RETURN maxvalue
ENDFUNCTION

(a) Write a statement to use this function to find the maximum value in an array NumberOfViewers

(b) Give the name of a parameter used by this function.

(c) Identify a local variable

(d) State the data type of score.

(e) Give an example from this function of
(i) an assignment statement [1]

(ii) iteration

(iii) selection

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
You know the right answer?
2. The following is a function: FUNCTION findmax(score)
length <- len(score)
maxvalu...
Questions
question
Biology, 09.02.2021 14:10
question
Mathematics, 09.02.2021 14:10
question
English, 09.02.2021 14:10
question
Mathematics, 09.02.2021 14:10
question
Mathematics, 09.02.2021 14:10
Questions on the website: 13722362