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

Week 8 Notes

by: Taylor Kahl

Week 8 Notes CSC 2720

Taylor Kahl
GPA 4.21

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

These notes cover everything from our lectures on Tuesday 10/11 and Thursday 10/13.
Data Structures
Jaman Bhola
Class Notes
Recursion, JFC, generics, iterators, Lists, languages
25 ?




Popular in Data Structures

Popular in Computer science

This 3 page Class Notes was uploaded by Taylor Kahl on Sunday October 16, 2016. The Class Notes belongs to CSC 2720 at Georgia State University taught by Jaman Bhola in Fall 2016. Since its upload, it has received 6 views. For similar materials see Data Structures in Computer science at Georgia State University.


Reviews for Week 8 Notes


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/16/16
Notes from 10/11 and 10/13 The Java Collections Framework (JFC):  implements many commonly used ADTs  Unified architecture for representing & manipulating collections  Includes: o Interfaces o Implementations o Algorithms  Both concrete and abstract classes can implement interfaces  Define an abstract class with “abstract” and “class” keywords o Example: public abstract class class_name { o at least 1 method in an abstract class must be declared “abstract”  abstract method: public abstract void method_name(); with no code inside the method  An Interface is basically an abstract class with only abstract methods o methods in interfaces have the same declarations as abstract methods, except for the “abstract” keyword o methods in an interface: public void method_name(); with no code inside the method o the main purpose of an interface is to be inherited Generics:  Allow classes & interfaces that can accept objects of multiple data types  Define a class or interface is followed by <E> o E is a data type that the client code will specify o Example class: public class ArrayList <E> o Example client code: Arraylist<Integer>; Iterators:  Allow cycling through items in a collection o Access the next item in a collection with:; method  2 interfaces for iterators provided by the JFC: o java.util.Iterator o java.util.ListIterator  Every ADT collection in JCF has a method to return iterator object  ListIterator methods: o add, hasNext, hasPrevious, Next, nextIndex, previous, previousIndex, remove, set  If you want to use ListIterator methods on an object, need to rename that object as a ListIterator o Example: ArrayList<Integer> x; ListIterator<Integer> y = x.ListIterator(); o now y is a ListIterator representation of the ArrayList x o If you write this code and then change the original object x, you need to redefine y before trying to use methods on y List Interface  java.util.List provided by JFC  supports an ordered collection/sequence  Methods: add, clear, contains, equals, get, indexOf, isEmpty, iterator, listIterator, remove, set, size, subList, toArray Recursion  Backtracking – a method of problem solving which guesses at a solution and backs up when reaching an impasse o Example: the 8 queens problem – fitting 8 queens on a chess board so that no queen can attack another o Solution: place 1 queen at a time in 1 square at a time. If the queen is in attacking position, remove it (backtracking) and try the next square until it can be placed; then try the next queen Language  A set of strings of symbols  Every compiler is based on language grammar and rules  If a java program is 1 string of characters, the language JavaPrograms could be defined as JavaPrograms = {Strings w, such that w is a syntactically correct java program}  Another language could be the set of algebraic expressions o AlgebraicExpressions { w, such that w is an algebraic expression}  Grammar – rules for forming strings  Syntax – key elements/symbols required to create a program  Semantics – rules to follow o Example: a for loop requires at least: for(;;)  Operations used in grammar: o x | y means “x or y” o x y means “x followed by y” o x * y means “x concatenated with y” o <word> means any instance of word that the definition defines  Example: <letter> = a | b | … | Y | Z  Compilers parse code – make sure it matches syntax & semantics o if program is ok, compiler converts it to byte code  3 languages for algebraic expressions o infix expressions  operator between operands  a + b o prefix expressions  operator before operands  + a b o postfix expressions  operator after operands  a b +  To convert from infix o move operators to beginning (for pre) or end (for post) of the 2 operands to be acted on o (a + b) * c o + a b * c o * + a b c o (a + b) * c o a b + c * o c a b + *


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

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."

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!"

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."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

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.