CSE 116 - Fall 2006 - Introduction to Computer Science for Majors II |
|
Exam 1 Sample Questions
Write method bodies for each of the following method headers:
A method that returns the Integer that is the minimum from the Bag of Integers.
A method that returns the Integer that is the maximum from the Bag of Integers.
A method that returns the Double average of the numbers in the Bag of Integers.
A method that returns how many occurences of a given letter occur in the String.
A method that returns true if the String
A method that returns the minimum value stored in the array.
A method that returns the maximum value stored in the array.
A method that returns the average of all the values stored in the array.
A method that returns the mode (the most frequently occurring number) from the array.
A method that takes a String and a Character and returns a String that is the original String with the character inserted after each one of the original characters. For example, if "dog" and "f" were passed in, the returned value would be "dfofgf".
A method that prints to the console the frequencies of each of the characters represented in the String.
A method that prints the words from the collection that have the number of
letters specified by the parameter, Other things to know for the test:
|
Announcements | Labs | Meetings | People | Resources | Schedule | Syllabus |
Last modified: Tue Sep 26 07:39:06 2006 |