Lecture25 - Java Programming, 3e Concepts and Techniques...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Programming, 3e Concepts and Techniques ICTN 2730 Lecture 25 03/19/2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Assignments Read chapter 6 and lecture notes. Sample solutions to Homework 7 have been posted on Blackboard. Homework 8 is due tonight. Homework 9 will be posted Thursday. The instructions will become less detailed. Please always feel free to ask questions. Today’s Office Hours: 11 am – 1 pm
Background image of page 2
3 Homework 7 What are the legal index numbers for the array, evenNumbers, given the declaration, int[] evenNumbers = {2,4,6,8}? a. 0,1,2,3 (Java uses zero-indexing) b. 1,2,3,4 c. 2,4,6,8 d. all even numbers
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Homework 7 For which of the following applications is an array NOT suitable? a. storing the scores of 12 midterm exams of a class b. storing the name, social security number, age and income of one individual c. storing the temperature readings taken every hour throughout a day d. storing a list of animals in the local zoo
Background image of page 4
5 Homework 7 Faculty.java Faculty has two unique attributes rank and courses and inherits attributes org , city , state from Employee Faculty has three unique instance methods and inherits all methods from Employee +getNumCourse() : int +getRank() : void +getCourses() : void +Faculty() : <unspecified> +rank : String +courses[] : String Faculty name attributes methods
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Homework 7 The getRank() method public void getRank() { Scanner scannerIn = new Scanner(System.in); scannerIn.useDelimiter("\n"); System.out.println("Please enter your faculty rank: "); rank=scannerIn.next(); } The variable scannerIn is declared inside the method and is only visible inside the method. It is an instance variable. The variable name scannerIn represents a different object in each of the three methods in the
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/29/2008 for the course ICTN 2730 taught by Professor Li during the Spring '08 term at East Carolina University .

Page1 / 21

Lecture25 - Java Programming, 3e Concepts and Techniques...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online