New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Fund. of Software Dev Honors

by: Miss Terry Reichel

Fund. of Software Dev Honors CSSE 221

Miss Terry Reichel
GPA 3.52


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Computer Science and Engineering

This 3 page Class Notes was uploaded by Miss Terry Reichel on Monday October 19, 2015. The Class Notes belongs to CSSE 221 at Rose-Hulman Institute of Technology taught by Staff in Fall. Since its upload, it has received 13 views. For similar materials see /class/225101/csse-221-rose-hulman-institute-of-technology in Computer Science and Engineering at Rose-Hulman Institute of Technology.

Similar to CSSE 221 at RHIT

Popular in Computer Science and Engineering


Reviews for Fund. of Software Dev Honors


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/19/15
1D and 2D Arrays An array is an Object that is an aggregate or stored collection of items An item may be an reference or primitive so long as it is of the type the array is declared as When declaring an array let s say of type int in this case you treat it much like a single variable definition int array1 new int30 In the above case quotintquot is the type associated with the given array the quotUquot known as an array indexing operator is used to show that the variable is an array and its second appearance on the right I used to give the array its maximum capacity 30 in this case A 2D array is declared similarly int array2new int3010 In the above case a 2D array is created with the first number representing the number of quotrowsquot and the second the number of quotcolumnsquot so this would be an array with 30 rows and 10 columns Arrays require to either be given a size or a list of items when they are declared This size they are given then becomes their set capacity So if an array is declared with a size of 10 it can hold NO MORE THAN 10 items If a larger capacity is wished a new array with the desired size must be created and the items from the old array moved to the new one To access an item in the array you use the variable name followed by quotUquot with the INDEX you want to access An example using array1 from above would be array13 This would access the item with index 3 but the FOURTH item in the array Similarly accessing a 2D array is much like 1D but one more number must be given array236 accessed the item with row index 3 and column index 6 Arrays are numbered starting a 0 so the 151 item in the 0 index the 2nd item in the 1 index and so on Because of this the MAXIMUM index of an array is one less than its size The size of an array can be accessed by the quotlength operation To use it place quotlength after the array s name array1ength would give the size of array1 30 in this case As a reference type the operation does not create a COPY of an array With this in mind if we were to declare two arrays quotAlphaquot and Beta and said AlphaBeta it would not copy Beta to Alpha but make both variables reference Beta This in mind if a value in Beta were changed ex Beta39 then both Alpha and Beta would reflect that change the operation does not create a separate copy it simply links both variable names to the same data ArrayLists are basically very exible arrays the capacity of the Java ArrayList is the actual size of the array used to store the list elements Capacity of the ArrayList grows automatically as we add elements to it Every time this happens the internal array has to be reallocated The items remain in relative position to other items unless manually modi ed Code example ArrayList arrayList new ArrayListthis creates an empty arraylist of size zero arrayListaddObj ect eadds whatever you want to the arraylist making its size one bigger as well you can also typecast whether the arraylist is to be an arraylist of ints or Booleans like this ArrayListltIntegergt arrayList new ArrayListltIntegergt Most commonly used methods are add Element e Appends the speci ed element to the end of this list returns a Boolean add int index Element e Inserts the speci ed element at the speci ed position in this list Returns void Clear Removes all of the elements from this list Returns void isEmpty Returns true if this list contains no elements Returns a Boolean indexOf Object 0 Returns the index of the rst occurrence of the speci ed element in this list or 1 if this list does not contain the element Returns an int isEmpty Returns true if this list contains no elements Returns a Boolean remove int index Removes the element at the speci ed position in this list Returns the removed element There are many other useful tools for arrayList that can be found in the java API Polymorphism Summary Type Compatibility Derived Classes are compatible with the classes they inherit or known as the Base Class Derived classes are combatable with Base other Derived classes from the same base considering that they use methodsvariables from the base class Polymorphism A Base class object can take base values from derived class objects This allows base objects to become equal to a derived object This is polymorphism Arrays for base objects can also be made to enclose the derived class objects Although making slots within this array do derived commands doesn t work without typecasting the derived class Having the wrong typecast on the array slot type will throw a ClassCastExcepton Using Instanceofwithin an if statement can prevent this error from normally occurring code example class Ball public void action DO NOTHING public class Soccerball extends Ball Override public void action Systemoutprihtlhquotgoalquot public class Football extends Ball Override public void action Systemoutprihtlhquottouchdownquot public class Vollyball extends Ball Override public void action Systemoutprihtlhquotkillquot l l public class ActionLawsuit x q Put here a description of what this method does k A m 54 n ihMyHahd k public static void mainBall inMyHand inMyHandactionargs notice separate methods are not required to display each individual class39s action


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Kyle Maynard Purdue

"When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the I made $280 on my first study guide!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.