HW 2 Part 1: 1 files in total
A PDF that contains your "cheat sheet" (or a link to your cheat sheet) [anonymous if you'd like]
HW 2 Part 2: no files to submit
Complete the HW 2 Part: Python to Java Practice assignment on Gradescope
For the rest of this course, we will be working in the Java programming language. Java is a statically typed, compiled, object-oriented programming language; it therefore has some differences from Python. The core programming concepts that you know from Python will still apply, but the differences will show up in a few ways.
Instead of giving you a top-down overview of Java, I’m going to have you use the SoloLearn platform to get started with Java. My intention is to give you a semi-structured approach that you could use again to learn another language. When you learn a new language, it can help to first see some basics and begin to familiarize yourself with the syntax and grammar. Then, you’ll start adapting sample code, and only after programming (and debugging!) in the language will you start to feel you “know” it. In the short time we have, you won’t become Java experts, but you’ll have the chance to write a couple programs.
It will be possible (and tempting) to complete the SoloLearn course without absorbing much of anything. To give some structure, you should:
take notes of what is different from Python
make up a “cheat sheet” for translating between the two
These activities should encourage a deeper engagement with the content (the point is not to complete the work, but to start the learning process for Java) and leave you with something to refer back to. You can feel free to copy-paste from the course, especially code snippets that might be good to have as a reference.
To the right is a starting list of fundamental programming building blocks that you have seen in Python. You'll be using SoloLearn to learn the syntax in Java.
Create a "cheat sheet" for these in Python, including simple examples.
As you work through the SoloLearn course, complete your cheatsheet by making a parallel reference for these in Java.
Your cheat sheets will become resources for you and your peers!
I will download/copy and post them on this web site. If you do not want your name(s) associated, please make sure to omit them from what you submit.
Comments
Printing
Types
Variables
Conditionals
Loops
Lists
OOP
In the Java course on SoloLearn, complete:
Module 1 on Basic Concepts (skip any “PRO” section)
Module 2 on Conditionals and Loops (skip any “PRO” section)
Module 3 on Arrays (skip any “PRO” section) – note that arrays in Java are somewhat analogous to lists in Python, except that they have a fixed size.
Part of Module 4 on Classes and Objects (through 36.1, skip any “PRO” section)
expanded view of Module 4 so you can see where to stop
When you're done, your SoloLearn dashboard should look like this:
Once you have your cheat sheet, use it to complete the "Python to Java" assignment on Gradescope.