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

Design of Large Programs

by: Trent Dare

Design of Large Programs CS 351L

Trent Dare
GPA 3.76

Joe Kniss

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

Joe Kniss
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 15 page Class Notes was uploaded by Trent Dare on Wednesday September 23, 2015. The Class Notes belongs to CS 351L at University of New Mexico taught by Joe Kniss in Fall. Since its upload, it has received 11 views. For similar materials see /class/212198/cs-351l-university-of-new-mexico in ComputerScienence at University of New Mexico.


Reviews for Design of Large Programs


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: 09/23/15
Interfaces amp Generics I g i 7 Lecture O3Aug 28 2007 LastTime 1 i 0 Testing is important i 0 We discussedJUnit 3 0 JUnit 4 is quite different RTFM 0 Use assert ltyour boolean test heregt O WLL be looking for ster here Clean code 0 DeathBox spec ambiguity 0 String containing an integer 0 Does 6abc live or die n HThelnterface worldview 0 Java supports programming by interfaces 0 Idea don t hardcode concrete classes into your code 0 Instead refer to everything through interfaces 0 Why l The Interface worIdVIew Design principle Principle of Abstraction Only work with the relevant aspects of a thing ignore stuff that39s not immediater relevant l The Interface worldVIew Design principle Centralized Definition De ne a thing only once in a program use a symbolic name to refer to it later Aka Don t repeat yourself Code examples Interfaces l Interface for Death Box public interface DeathBox gtkgtk gt Attempt to put another object into a DeathBox gtk param o the object to attempt to place in the DeathBox return true if 0 was put into the DeathBox successfully and false if 39you died39 attempting to put it in or were already dead before the latest putlnto attempt gtk public boolean putlntoObject o l Implementation of 0 Implement the interface public class DeathBoxKniss implements DeathBox constructor public DeathBoxKniss dead false function description here public boolean putlntoObject o if dead return false private boolean dead llMoreon Interfaces 1 l O Interfaces only declare functions l O No function de nitions no body 0 They do not allow protectedprivate functions 0 Only legal if the user can call it 0 They do not allow member variables 0 Interfaces themselves have no state 0 Constants ARE allowed tho public static nal llnterfaces as concepts g7 0 Multiple inheritance is illegal in java 0 A class CAN implement multiple interfaces 0 Abstract generic behaviors for example 0 Comparable O Additive 0 Iteration Note use of generic type T here public interface ComparableltTgt int compareToT obj llnterfaces are extensible g7 0 You can add more functionality public interface MyCompareltTgt extends ComparableltTgt boolean isSameT obj 0 You can compose interfaces 0 New interface with properties of multiple 0 Looks like multiple inheritance public interface Z extends XY lAccessing Constants 0 There can be ambiguity with interfaces public interfaceA int vall public interface B extendsA int val2 public class C implements B 0 Which value to we access C c new C cval lAccessing Constants 0 There can be ambiguity with interfaces public interfaceA int vall public interface B extendsA int val2 public class C implements B 0 Which value to we access C c new C cval 2 Acval l IIVVthnte rfaces Separate appearance and behavior Interface how the object looks to programmer Implementation how the object behaves How is this different than inheritance Interfaces allow a clean view of a class Do you write the test for O DeathBox interface or 0 DeathBoxltyournameheregt class 0 How does JUnit affect this


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

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


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