Introduction Computer Programming - Lab 7 - Fall 2005 | CSC 3405, Lab Reports of Computer Science

Material Type: Lab; Professor: Wei; Class: Intro Computer Programming; Subject: Computer Science; University: Saint Joseph's University; Term: Spring 2009;

Typology: Lab Reports

Pre 2010

Uploaded on 08/16/2009

koofers-user-9fw-1
koofers-user-9fw-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lab 7
CSC3405/3605
Name:
Due Date: Monday, 3/30/2009
Part 1:
Part 2:
Part 3:
a). Write a function which is passed an integer, searchValue, and an array, and
counts the number of elements in that 10 element array that are equal to the
search value. I’ll start it for you:
static int howManyMatch (int [] list, int searchValue)
{
int numMatch = 0;
return numMatch;
}
b). How would you call this function from the main program, supposing you
wanted to know how many 2’s were in the array? Write a driver to test your
searchValue method.

Partial preview of the text

Download Introduction Computer Programming - Lab 7 - Fall 2005 | CSC 3405 and more Lab Reports Computer Science in PDF only on Docsity!

Lab 7

CSC3405/

Name:

Due Date : Monday, 3/30/ Part 1: Part 2: Part 3: a). Write a function which is passed an integer, searchValue, and an array, and counts the number of elements in that 10 element array that are equal to the search value. I’ll start it for you: static int howManyMatch (int [] list, int searchValue) { int numMatch = 0; return numMatch; } b). How would you call this function from the main program, supposing you wanted to know how many 2’s were in the array? Write a driver to test your searchValue method.