Supplemental Materials

Note: OS X Firefox users might find the following PDF Plug-in useful for websites that have embedded PDF files (like this one).

   
Week 1 Intro to UMD/CMSC/131,     The Computer and Programming
Intro to Java Output, Methods, Variables, and Input (these will cover Friday and next Wednesday)
Week 2 Intro to Java Output, Methods, Variables, and Input    Strings, Input/Output (these might start on Fridy but mostly be for Monday)   

Overflow.java   PlusPlusIng.java   QuickMath.java   SomeStrings.java   SimpleInput.java  
Week 3 Strings, Input/Output    Conditional Statements and Logic Operators,   

WhatType.java   Comps.java   IsGreaterTest.java   EvenOddConditional.java   CascadingConditional.java   CompoundConditional.java   NestedConditional.java   ComparingStrings.java   InitialValues.java  

Flowcharts (same username/password as study questions): CompoundConditional   CascadingConditionals  

some number conversions   more number conversions  

Naming Conventions (to read)   Iteration Overview (to read)  
Week 4 For Loops   While Loops  

ExampleFor.java   SumToN.java   MajorTom.java  
ExampleWhile.java   BoredYet.java   ExampleDoWhile.java   ExampleDoWhileWithMethod.java  

Readings on Expressions(to read)  
Week 5 Methods and Memory   Strings and Memory (drawing)  

StringGames.java   BuildingStrings.java   (Does this flowchart help reveal a small logic problem?)
DoSomeMath.java (partial memory trace)    DoSomeMoreMath.java   AddOne.java  

Grids and Nesting Loops (to read) 
NestedForLoops1.java   NestedForLoops2.java   NestedWhileLoops.java  
Week 6 Wrappers and Mutability  

ints, Integers, and Memory (drawing)  
BigIntPlusPlus.java  

StringEfficiencyExample.java   StringHolder.java   StringsAndMutability.java  
UsingStrings.java   UsingMathLibrary.java  

TestingExample.java  

MinusMinus.java   PlusPlus.java   ShortCircuit1.java   Conversions.java  
Week 7 Unit Testing   2D Graphics (Part 1)   Memory Model Recap (recap to review)    Designing Classes  

MutableInteger.java   MutateExample.java  

Point3D.java   PlayWithPoints.java  
NEW ADDITION: Point3D memory example
Week 8 Pixel and Photograph   Datatype Class Example  

Student.java   SimpleStudentDriver.java   StudentTesting.java  
Week 9 Exceptions (lab topic)   Generics  

ArithmeticExceptions.java   TryCatchFinally.java   IOerror.java   MultipleCatches.java   OverflowException.java  

Pair.java   UsePair.java  
Week 10 ArrayList  

ArrayListOfDoubles.java   ArrayListOfStudents.java  

(lab topics)
The FancyWord.java file from last and the JUnit contents as well.

Ternary and Switch   SwitchExample.java  
Week 11 Introduction to the Array  

SimpleArray.java   ArrayOfReferences.java   ThreeWaysToCopyArrays.java   ArrayParameter.java   ArrayParameterDriver.java  

Interfaces  

Animal.java   Cat.java   Dog.java   PetDriver.java  
Week 12 Java 8 features example: AnimalJ8.java   CatJ8.java   DogJ8.java   MartianJ8.java   DriverJ8.java  

SeeminglyPrivate.java   SeeminglyPrivateDriver.java  

Collection and Collections   Recursion (Part 1)  

CollectionExample.java   FactorialExample.java   PrintBackwardsExample.java  
Week 13+ Casting Overview   Multi-Dimensional Structures  

UpperTriangle.java   UpperTriangleTwo.java  
ReallyRaggedArray.java   ReallyRaggedArrayList.java  

Enumerated Types

Searching and Sorting
Sorts.java   SortsTest.java  
Last Week+ Recursion (Part 2)
SubsetSumSolver.java  


To import a Java code example from one of the text files above:
  • First, you need to have a Java Project in Eclipse into which you will import the file. This is something you only have to create once and then you can use that project space for exploring whichever class code examples you'd like to bring into Eclipse. To create this space, right-click on the white space in the Package Explorer pane and select NEW and then Java Project. After that, enter the name for this project (something meaningful like ClassExamples perhaps) and click Finish. You will now have an empty Java Project in Eclipse.
  • Then, in the future, when there is an example above that you'd like to bring into Eclipse to explore, right-click the .java filename above and save it to some location on your machine (the Desktop is an easy place to later find for example).
  • Within the Java Project in Eclipse (once created) there will be a folder named src. Right-click on this folder and select the Import... option. Then, in the dialog box that comes up there will be an option under General to import from the file system, select that option. Browse to the folder into which you have saved the .java file previously and select that folder. You will then be given a list of files in that folder and can check off the .java one to be imported.
  • That .java file should now be in your project. If you open it in the Eclipse editor you can then run it.







    Web Accessibility





  • CMSC 131
    Object Oriented Programming I

    Information/Resources Announcements 
    Course Syllabus 
    TA Office Hours 
    Projects 
    Pitch Paper 
    Study Questions 
    Slides/Supplementals 

    Canvas/ELMS 
    Submit Server 
    Grades Server 

    Eclipse/Java Setup 

    Word cloud of CMSC 131 terms