CSE 114 Study Guide - Final Guide: Instance Variable, Mutator Method

30 views3 pages

Document Summary

Be sure to show your code to one of the lab tas before you leave, so that you can receive credit for this lab. You must also upload a copy of all your source code (. java) files through the link on blackboard by 11:59 pm on tuesday, November 7: implement a class named stackofobjects that can (theoretically) store an infinite number of values. This class has the following instance variables and methods: This array should be declared as an instance variable, but not instantiated until the constructor (described below) executes. As the array fills up, it will be replaced with a new, larger array that contains all of its previous contents. * a private integer variable named size that counts the current number of elements stored in the array. (size 1) is the index of the element at the top of the stack. * a public no-argument constructor that initializes the array instance variable with an initial capacity of 2.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents