Jonathen Germakovski's CS1 Work Site

This site represents work that I have done in support of my efforts to learn to program in the CS1 course at SUNY Oswego during the Fall 2019 semester. The materials will be temporally organized for the most part. Links to external sites that pertain to computer programming, problem solving, Java, Web development, and related matters will be placed after the personally created artifacts.

Course Work

Lab 1 "Hello World! Hello You!" The first is loosely referred to as the “hello world”program. This opener is purely text-based. The second is a variant of the first which features awidget– a compu-tational component with a graphical representation. HelloWorld code + HelloWorld demo | HelloYou code + HelloYou demo

Lab 2 "Hello Painter! Hello Composer!" One premise of this course is that it tends to be more fun to take, and more fun to teach, if some interesting compu-tational objects, housed in computational learning environments, are incorporated into the course. With this premisein mind, agraphical microworldand amusical microworldare introduced in this lab. BlueDot code + BlueDot demo | Dorothy code + Dorothy demo | BasicsListener code + BasicsListener demo | Melody code + Melody demo | Target code + Target demo|

Lab 3 "Establishing a CS1 Work Site" Setting up a Web site to house programs and demos and a few miscellaneous links.

Lab 4 "Expressions and Shapes World Problem Solving" For this lab you will be asked to write two programs, each a little bit at a time. The first program involvesarithmeticexpressions. The second program involvesshapesfrom the NPW. You will also be asked to post these programs, aswell as output generated by these programs, to your work site. ShapesThing code + ShapesThing demo | ExpressionsThing code + ExpressionsThing demo |

Lab 5 "An Interpreter FeaturingLoop Foreverand Selection" For this lab you will be asked to write a sequence of threeinterpreters. Aninterpreteris a program thatrecognizesandresponds tocommands. The interpreters will display dots of various colors in a window. Input will be obtainedthrough one kind ofdialog box. Output associated with aHELPcommand, as well aserror messages, will be displayedthrough another kind ofdialog box. Interpreter1 code| Interpreter2 code| Interpreter3 code| Coloerd Dot demo | Error Dialog Box demo | Help Menu demo | Input Dialog Box demo |

Lab 6 "Functions and Commands" For this lab you will be asked to write one program that featuresfunctionsand one program that featurescommands.Afunctionis a method that is characterized by the return of a value. Any actions performed during execution of themethod are performed in the service of computing the value to be returned. Acommandis a method that is char-acterized by performing some action. Any values that are computed during execution of the method are computedin the service of performing the action. You will be asked to mindfully engage in the process ofstepwise refinementas you prepare the first two programs for execution. Finally, you will be asked to perform a simple program alteration. SurefaceAreaOfCube code + SurefaceAreaOfCube demo | Balloons code + Balloons demo | AlternateBalloons code + AlternateBalloons demo |

Lab 7 "String Thing" This lab features two programs. The first program,StringOps, which you will merely type in and run, providesyou with an opportunity to get acquainted with some basic character string processing functionality. The secondprogram,StringThing, provides you with an opportunity to write some character string processing code. StringOps code + StringOps demo | StringThing code + StringThing demo |

Lab 8 "Array Play" This lab features three programs. The first two programs,PrimesandStreets, are merely intended to help youto wrap your minds around the basics of array creation and array element referencing. Basically, you will read thePrimesprogram and write, by analogy, theStreetsprogram. The third program,ReverseCopy, features arrayprocessing and illustrates file IO by solving a relatively realistic problem, that of reading words from one file andwriting them, in reverse order, to another file. This program can serve as a model for subsequent programs that youwrite involving file IO. The program also contrasts use of thewhilestatement and theforstatement, introducesyou to the role thatexceptionsplay in computer programming, and makes limited use ofpropertiesassociated withtheSystemclass. Primes code + Primes demo | Sheets code + Sheets demo | ReverseCopy code + ReverseCopy Original File + ReverseCopy New File|

Lab 9a " Simple List Processing" This lab, like the Array Play lab, features three programs. In fact, the three programs featured in this lab are clearriffs on those featured in the Array Play lab. Whereas the programs in the Array Play lab were dedicated to ac-quainting you with basic concepts and mechanisms associated with thearray, the programs in this lab are dedicatedto acquainting you with basic concepts and mechanisms associated with theArrayList. Primes code + Primes demo | Sheets code + Sheets demo | ReverseCopy code + | ReverseCopy Original File + ReverseCopy New File|

Lab 9b " Simple List Processing" In this lab you will write two programs which perform common processing tasks on list structures. Both programswill produce the same output, but will be constructed in very different ways. The first program will make use ofexplicitforloops and functions to perform operations which can easily be composed to produce more complexoperations. The second will make use of streams to perform the same tasks. Primes code + Primes demo | Sheets code + Sheets demo | ReverseCopy code + | ReverseCopy Original File + ReverseCopy New File|

Lab 10 "Establishing and Using Classes" This lab features two programs. The first program,Die, is aclasswhich models a die – an object of chance that youtend toroll. The second program,Roller, creates and usesDieobjects – instances of theDieclass. Die class code + Rollor code + Rollor demo

Lab 11 "Modeling Objects with Classes" In this lab you are guided through the process of writing a class to model a person. ThePersonclass will have 5instance variables and one constructor. Initially, it will have just one method, thetoStringmethod. You will begiven instruction on how to write a program,PersonDemo1, to test this class in its initial form.You will then be introduced to the idea of defining and implementing aJava interface. You will be guided throughthe process of enhancing the initialPersonclass byimplementingthe interface for the class. Along with this mod-ification to thePersonclass, you will be instructed on how to modify thePersonDemo1test program in order toassure that the additional functionality is working.Finally, you will be asked to write an alternate version of the test program,PersonDemo2, one which features anarray ofPersonobjects. PersonSpecification code + PersonSpecification code | PersonDemo1 code + PersonDemo1 demo | PersonDemo2 code + PersonDemo2 demo |

Lab 12 "Grapheme to Color Synesthesia" This lab features a program that simulates grapheme to color synesthesia. It takes the form of an interpreter. Twoparallel arrays are featured in the grapheme to color mapping. Strings and arrays cooperatively perform the essentialelements of the computation. Thesimple painterclass easily supports the graphics processing. Synesthesia code + Synesthesia demo |

Programming Assignment 1: "Microworld Problem Solving" Programs to create images in the Nonrepresentational Painting World (NPW) and sonic sequences the Modular Melody World (MMW). RedCross code + RedCross demo | KanizsaSquare code + KanizsaSquare demo | Dots code + Dots demo | ThreeFigureMinuetThing code + ThreeFigureMinuetThing demo | MinuetFigureListener code + MinuetFigureListener demo | AfterJSB code + AfterJSB demo

Programming Assignment 3: "Shapes World Problem Solving" Lab 4 should be viewed as an important element of preparation for this assignment, so you want to be sure to have completed that lab prior to starting this assignment. You should also study the functionality associated with simple shapes in Appendix 1 of your Laboratory Manual. WorkArea code + WorkArea demo | WhiteArea code + WhiteArea demo | YellowSpace code + YellowSpace demo | ShippingContainer code + ShippingContainer demo |

Programming Assignment 4: "Nonrepresentational Artistic Expressions" You should review the Nonrepresentational Painting World functionality, and the mechanisms for selection and repetition previously presented in lecture and in lab. You might also like to adopt a frame of mind in which laying down shapes in the plane resonates with nonrepresentational art. Perhaps you would like to Google Klee, Stella, Hirst, and a number of other modern artists, in order to explore some of their images and ideas. TextRectangle code + TextRectangle demo | CircleOfSquare code + CircleOfSquare demo | HerstSqares code + HerstSqares demo| HerstDots code + HerstDots demo | SimpleDots code + SimpleDots Green demo + SimpleDots Black demo + SimpleDots Blue demo + SimpleDots Red demo | Invention1 code + Invention1 demo | Invention2 code + Invention2 demo + Invention2 demo + Invention2 demo | Stella code + Stella1 demo Stella2 demo Stella3 demo

Programming Assignment 5: "Three List Interpreters" Review the given program, the NumberList program of the arrayplay package. Word List | NumberLists code + NumberLists demo | Word List | WordLists code + WordLists demo | Word List | WordLists code + WordLists demo |

Programming Assignment 6: "Chromesthesia" For your final assignment of the semester I am simply asking you to do Lab 13: Chromesthesia. Chromesthesia code + Pitch Class code | Canvas demo + Canvas demo

Various external sites relating to course content

Java Notes | Think Java: How to Think Like a Computer Scientist | Java Examples | Oracle's Java SE Tutorial | WWW Consortium