CS1150 (Spring 2012)

Principles of Computer Science

Quick Info

Principles of Computer Science
Brian Parks (bparks AT vast DOT uccs DOT edu)
Office: ENGR 176 ("CS Graduate Students") or ENGR 148 (inside ENGR 149, VAST Lab)
Office Hours: F 10:45 AM - 12:00 PM (after class) and TR 9:45 - 10:45 AM in ENGR 176 or by appointment
Syllabus: (
Emailed files should be named using the following syntax (all lowercase):


About the course

The course catalog has the following to say about this course:

Introduction to programming with emphasis on computer science concepts. Develops methods for computer problem solving. Develops proficiency for programming in a modern programming language, and introduces the concepts of abstraction in problem solving. Includes basic concepts of computer systems and environments including debuggers, editors, and file systems. Prer., High school algebra and familiarity with computer concepts including file operations and text editing.


Video Lectures

  1. 20 January: Introduction (No video lecture)
  2. 27 January: Variables
  3. 3 February: Decisions
  4. 10 February: Loops
  5. 17 February: Methods
  6. 24 February: Arrays
  7. 2 March: Objects
  8. 16 March: Strings and I/O
  9. 23 March: Object-Oriented Programming
  10. 6 April: Inheritance and Polymorphism (most of the lecture is here; Quicktime Player crashed toward the end)
  11. 13 April: GUI Basics
  12. 20 April: Exceptions
  13. 27 April: Abstract Classes and interfaces, Part 1 and Part 2


  1. Do "Programming Exercises" 2.6, 2.7 (page 64), and 2.21 (page 68). Name the Java class for exercise 2.6 SumDigits, ComputeYearsAndDays for exercise 2.7, and AreaOfTriangle for exercise 2.21. For instance, exercise 2.6 should start with a file containing
    public class SumDigits {
      public static void main(String[] args) {
        //Your code goes here
    See the hints on exercises 2.13 (for raising numbers to exponents/powers) and 2.20 (for the distance formula to compute the length of the sides of the triangle). Due 3 February 2012 at 11:59 PM.
  2. Do "Programming Exercises" 3.1 (page 106), 3.11 (page 108), and 3.22 (page 110). Name the Java class for exercise 3.1 QuadraticFormula, DaysInMonth for exercise 3.11, and InsideCircle for exercise 3.22. For instance, exercise 3.1 should start with a file containing
    public class QuadraticFormula {
      public static void main(String[] args) {
        //Your code goes here
    Due 10 February 2012 at 11:59 PM.
  3. Do "Programming Exercises" 4.3 (page 147), 4.12 (page 148), and 4.41 (page 153). Name the Java classes KilogramTable, SmallestInteger, and MaxCount, respectively. Due 17 February 2012 at 11:59 PM.
  4. Do "Programming Exercises" 5.9, 5.10 (page 190), and 5.35 (page 196). Name the Java classes FeetToMeters, NumberOfPrimes, and AreaOfPentagon, respectively. For Exercise 5.9, you do not need to generate both tables side by side. For Exercise 5.10, you should get 1230 primes. Due 24 February 2012 at 11:59 PM.
  5. Implement the Bubble Sort algorithm as discussed in class (and in the second half of the video lecture from today), using the skeleton file. The values to sort should be specified as command line arguments (they should be the only command line arguments) and the only output should be the sorted array, one element per line. You should fill in the body of all three methods: main, bubbleSort, and swap. Make sure it works on the example list in the book and on a presorted list. Due 2 March 2012 at 11:59 PM.
  6. Implement the classes for Programming Exercises 8.1 and 8.7 (pages 296 and 297). You do not have to worry about the UML diagrams, as we did not cover this. You also will not have to submit your test cases; use these to test your classes. A sample main with different test cases is provided and I will use a different main method with a third set of test cases for grading. Your classes themselves should not generate any output. (NOTE: The specification that all accounts have the same interest rate is an indication that this should be a class (i.e.: static) variable, not an instance variable.) Zip up the two class files (Rectangle and Account) and email. Do not include any main classes or methods in your submission. Due 9 March 2012 at 11:59 PM.
  7. Implement the functionality described by the comments in the skeleton file as per Programming Exercise 9.11 on page 337. Use command-line arguments. Due 23 March at 11:59 PM.
  8. Implement both the MyRectangle2D and the test class described by Programming Exercise 10.12 on page 370. Name the test class MyRectangle2DMain. You do not need to provide UML. Due 6 April 2012 at 11:59 PM.
  9. Do Programming Exercise 11.3 on page 403. Use netbeans, naming your package edu.uccs.cs1150.yourname.accounts. Zip up the entire netbeans project directory and email. Due 13 April 2012 at 11:59 PM.
  10. Write the answers to review questions 12.1 and 12.7 (page 425) and send in the body of an email with the proper subject line. I do not expect the answers to be lengthy; most are one-word or a short sentence. Due 20 April, 2012 at 11:59 PM.
  11. Augment assignment 8 by including exceptions. There is no specific requirement as to what the exception must be, as lomg as it meets the following requirements: You may use either NetBeans or DrJava, but submit only the Java files. Due 27 April, 2012
  12. Do Programming Assignment 14.9 on page 493. Submit ONLY the implementation of the max method. Due 4 May 2012 at 11:59 PM.