CS 1: Lecture 8 – Methods
Dear students, First, let’s a new data type to our repertoire: a random number generator. If I tell you that the name of this type is Random, could you create a new variable that is capable of generating random numbers? You should be able to. We can tell by its capitalization that it is a […]
CS 148: Lab 3 – String and Math
Welcome to lab 3! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. Work with a partner that you have not […]
CS 1: Lecture 7 – String Cont’d
Dear students, With Strings at our disposal, our programs are going to start to feel human. We can write programs that process and generate words, and that’s pretty amazing! But we need more practice using them before we determine the authenticity of Shakespeare’s works. Let’s play some Stringo! Generate a String of five characters. Use […]
CS 1: Lecture 6 – String
Dear students, If this class was a book, the chapter we’re in right now is Computer as Calculator. I’d mentioned that computers got their start in the world of mathematics. Why exactly did computers start with the mathematicians? The good news is that numbers are not the only thing that computers are good at crunching. […]
CS 1: Lecture 5 – Math Methods
Dear students, Today we introduce the Math class. This class has a bunch of pre-written recipes for computing various mathematical operations. We can see what it all provides by looking at its documentation. I usually find this documentation by searching java ClassName in my favorite search engine. Let’s explore the methods that the Math class […]
CS 148: Lab 2 – Scanner and Math
Welcome to the lab 2! Our goal today is to become more familiar with user interaction and the various mathematical operations. Checkpoint 1 Person A types. Start by creating a package in your Eclipse project named lab02. Let’s write a program that prompts the user for two colors and mixes them together. This sort of […]
CS 1: Lecture 4 – Mathematical Data and Operations
Dear students, CS 145: Yesterday we had our first lab. Tuesdays are a marathon day for me, and I am in class from 8 AM to 5:15 PM (with a lunch break). Your positive attitudes make it bearable and worth it. Many folks finished within the lab time. This will not always be the case, […]
CS 1: Lecture 3 – Scanner
Dear students, We start today by visiting a few of your questions and observations from your quarter sheets. I read through every single one of these, and respond to a few. They help me feel the pulse of the class. Last time we just started teaching a machine to perform some math for us. I […]
CS 1: Lecture 2 – Computer as Calculator
Dear students, Last time we started to explore one of the primary activities of computer science: organizing process. We started this adventure using Madeup, but today we’ll jump into Java, the language we will spend most of our time with this semester and next. Java is a language originally developed by Sun Microsystems. It surged […]