CS 1114 Lecture Notes - Lecture 14: Foreach Loop

48 views2 pages

Document Summary

Homework: complete reading x (chapter viii); complete code workout due s, 12/03 at 23:59. Upcoming assignments: complete program v due w, 11/29 at 23:59; begin lab xiii due f, 12/11 at 16:30. Prog5: ideally, one should utilize one method to see if health is zero, such that it can be utilized throughout the program. Do not duplicate yourself; attempt to consolidate code by using inheritance (especially try to declare fields once and only once). Notes: arrays are a special-fixed size collection type (cannot change size). Unlike lists, arrays are able to store primitive values and object references. Arrays are very fast since they are built into java. Arrays are objects, but they don"t have useful methods they don"t do very much: example: creating an array object public class loganalyzer private int[] hourcounts; private logfilereader reader; public loganalyzer() hourcounts = new int[24]; reader = new logfilereader();

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents