MCS-178: Introduction to Computer Science II (Spring 2018)
Note: This web site will be modified as the
semester progresses. You are responsible for all the updates made here, so please check this page often.
- January 10th, 2018: the course page is up and running.
- January 11th, 2018: Special annoucement for the students of MCS-178 :
professor Yu will be presenting in a conference in Osaka, Japan from
2/27 to 3/4. So, you will be spending 2/27, 2/28, 3/1, and 3/2 working
on project 2 (please see the schedule page). This is unlike previous
semesters. As a result, all of the lectures prior to project 2 will be
pushed ahead in order for you to spend those four days working on
project 2. And, you might not have a complete picture about Java by that
point (although I will try my best to give you enough information for
you to finish project 2, the rest of the lectures on Java will be given
once I get back). Thus, it is very important for you to work on project 1
and project 2 deligently. Try to finish project 1 as fast as possible.
If you are done with project 1, work on project 2. Finally, you should
go to the tutors frequently, if only to use that time and environment to
work. If you are stuck, get the tutors to help you.
- March 6th, 2018: Due to the snow day today, some labs were canceled. As a result, the course schedule had been changed slightly and the due date for project 3 had been pushed back slightly. Please check the course schedule for detail.
- The lecture notes and corresponding examples will be posted on Moodle a few hours before the lecture.
- All the projects are available now.
- Test1/Test2/Final exam preparation notes will be posted two weeks before the tests/exam on Moodle.
- Course Information
- Syllabus/Schedule/Archive
- Instructor Information/Availability
- Useful Links:
- Projects:
- Lecture Notes (will be available on Moodle):
- Lecture 1 (and lab 1) available on Moodle
- Lecture 2 available on Moodle
- Lecture 3 available on Moodle
- Lecture 4 available on Moodle
- Lecture 5 available on Moodle
- Lecture 6 available on Moodle
- Lecture 7 available on Moodle
- Lecture 8 available on Moodle
- Lecture 9 available on Moodle
- Lecture 10 available on Moodle
- Lecture 11 available on Moodle
- Lecture 12 available on Moodle
- Lecture 13 available on Moodle
- Test 1 preparation slides available on Moodle
- Lecture 14 available on Moodle
- Lecture 15 available on Moodle
- Lecture 16 available on Moodle
- Lecture 17 available on Moodle
- Lecture 18 available on Moodle
- Lecture 19 available on Moodle
- Lecture 20 available on Moodle
- Lecture 21 available on Moodle
- Lecture 22 available on Moodle
- Lecture 23 available on Moodle
- Lecture 24 available on Moodle
- Test 2 topics and practice questions are available on Moodle
- Lecture 25 available on Moodle
- Lecture 26 available on Moodle
- Lecture 27 available on Moodle
- Lecture 28 available on Moodle
- Lecture 29 available on Moodle
- Lecture 30 available on Moodle
- Lecture 31 available on Moodle
- Lecture 32 available on Moodle
- Examples covered in class:
- add.asm - this program reads in 2 integers, adds them up
- smaller.asm - this program reads in 2 integers, then prints the smaller number
- sum1ton.asm - this program reads in a positive integer n and prints out the sum
- range.asm - read in two numbers then print all integers between the two numbers inclusive
- fact.asm - computes the factorial from 1 up to a user input number, the iterative version
- rfact.asm - computes the factorial from 1 up to a user input number, the recursive version
- sumDigits.asm - sums the digits of a number, the recursive version
- writeDigitsStart.asm - writes each digital of a number, version 1
- writeDigits.asm - writes each digital of a number, final version
- HelloWorld.java - your very first Java program
- UseArgument.java - Java program that takes in user arguments
- IntOps.java - Java program illustrating integer operations
- flip.java - Java program Simulating a fair coin flip
- coinflips.java - Java program Simulating n coin flips and calculates the fraction of heads
- TenHellos.java - Java program printing out "hello" 10 times
- n_coinflips.java - Java program Simulating multiple person, each doing n coin flips
- PrintDate.java - Java program printing days, month, year, demonstrating switch statements
- Prime.java - Java program taking a command-line argument N and prints out true if N is prime, and false otherwise
- Prime.java - Prime.java rewritten in different loop constructs
- bubble_sort.java - Java program filling an array full of random integers, then do a bubble sort.
- Matrix.java - Java program implementing Matrix operations.
- Average.java - Java program reads in a sequence of real numbers, and computes their average; demonstrating StdIn
- BouncingBall.java - Java program implementing a 2-d bouncing ball, demonstrating StdDraw
- Primes.java - Java program printing all primes up to the number given as the 0th command argument.
- bubbleSort_b.java - Java program implementing a bubble sort, using static methods.
- Factorial.java - A class implementing the recursive version of factorial.
- binarySearchTemplate.java - the template for binary search, for in-class exercise.
- binarySearch.java - the solution for binary search.
- Carpet_starter.java - Starter file to draw a Sierpinski carpet
- Carpet.java - Draw a Sierpinski carpet, solution
- TowerOfHanoi_starter.java - Starter file to solves the "tower of Hanoi" puzzle
- MergeSort.java - Recursive version of merge sort
- TowerOfHanoi.java - Solves the "tower of Hanoi" puzzle, solution
Fibonacci.java - Recursively solves the Fibonacci sequence, then solves it using Top Down DP (Memoization) and Bottom Up DP
- LCS.java - Solves Longest Common Substring problem using dynamic programming (Max's code, from video 1)
- LCS.java (version 2) - Solves Longest Common Substring problem using dynamic programming (the book's code, also from Max's video 2)
- Video 1 - Video # 1 of Max live-coding the LCS problem
- Video 2 - Video # 2 of Max live-coding the LCS problem (fine-tuning version to a version similar to that in the text book)
- Choose.java - Recursively solves binomial coefficient, then solves it using Top Down DP (Memoization) and Bottom Up DP
- Charge.java - The instance class implement a Charge
- ChargeClient.java - The client class using Charge
- IntegerStack.java - Class implementing integer stack
- Employee.java - Super class implementing employee
- HourlyEmployee.java - Sub class implementing hourly employee
- SalariedEmployee.java - Sub class implementing salaried employee
- Date.java - class implementing date
- IntegerArrayStack.java - A derived class of the IntegerStack class
- Drawable.java - Interface drawable
- Circle.java - Circle class extends interface drawable
- Square.java - Square class extends interface drawable
- TestDraw.java - Draw using Circle class and Square class
- ArrayListExample.java - The ArrayList example
- The structure example we had been working on is available on Moodle
Test and Exam Preparations: