CS 152: Computer Programming Fundamentals
Instructor:
Brooke Chenoweth
Department of Computer Science
Email: bchenoweth@cs.unm.edu (Include course number in a meaningful subject line, please)
Office: FEC 2060
Office Hours: Friday 2:00pm-4:00pm via Zoom, Tuesday 1:30pm-3:00pm in person, or by appointment
Lectures
Lectures are 10:00 am - 10:50 am MWF in Centennial Engineering Center 1041
Labs and Section Leaders
Lab 001 (CRN 32289)
- Time: 11:00 am - 11:50 am M
- Location: Mechanical Engineering 220
- Section Leader: Logan Nunno
Lab 002 (CRN 32290)
- Time: 11:00 am - 11:50 am W
- Location: Mechanical Engineering 210
- Section Leader: Leo Wang
Lab 003 (CRN 32291)
- Time: 11:00 am - 11:50 am F
- Location: Mechanical Engineering 220
- Section Leader: Santoya Martinez
Lab 004 (CRN 32292)
- Time: 12:00 pm - 12:50 pm M
- Location: Centennial Engineering Center 1032
- Section Leader: Maisy Dunlavy
Lab 005 (CRN 60023)
- Time: 12:00 pm - 12:50 pm W
- Location: Mechanical Engineering 220
- Section Leader: Molly Palko
Lab 006 (CRN 36404)
- Time: 12:00 pm - 12:50 pm F
- Location: Centennial Engineering Center 1032
- Section Leader: Saskia Trefethen
Lab 007 (CRN 44039)
- Time: 9:00 am - 9:50 am W
- Location: Centennial Engineering Center 1028
- Section Leader: Quinn Sena
Lab 008 (CRN 60329)
- Time: 9:00 am - 9:50 am F
- Location: Centennial Engineering Center 1028
- Section Leader: Finn Ellis
Office hours for section leaders are linked from Canvas.
Feel free to go to any of the section leaders for help.
You aren't limited to the assistant for your own section.
Course Description
CS-152 is an introduction to the art of computing. This course has
several goals. Students who successfully complete the course should
have a firm grasp on creating small programs in Java, should be able
to solve problems with code, should have a more full idea of what
Computer Science as a field is, and most importantly not be afraid to
dive into code!
The primary emphasis of this course is to develop fluency in working
with conditional control flow, looping structures, and procedural
programming techniques. The secondary emphasis is to apply those
skills in solving computational problems.
CS-152 is a project based course: students spend many hours writing
programs that have a wide range of applications. In past semesters
these have included business applications, multimedia manipulations,
video games, simulations of complex systems, and scientific models.
CS-152 is currently taught using the Java programming language.
While Java is an Object Oriented Programming (OOP) language and while
students in CS-152 will certainly be working with Objects, CS-152 is
not a course on OOP. Experienced Java programmers with solid skills in
control flow, procedural programming and computational problem solving
should skip CS-152 and take CS-251 (Intermediate Programming). CS-251
is also currently taught in Java and its primary emphasis is on
understanding, developing and applying OOP skills.
- Updated 2024-01-22 with office hours
Handy References and Links
CS 152 Code Standards
Java
- Software
- Reference Material
- Learn more online
Past exams
Lectures and Assignments
Week 1
- Monday, January 15: Martin Luther King Day
- University Holiday: No classes or labs today
- Wednesday, January 17: Welcome and Intro
- Friday, January 19: Variables and Types
- No lab meetings this week
- There are no lab sections meeting this week, only lectures.
- It would be a bit odd for Tuesday sections to meet before the first lecture on Wednesday.
- The lab rooms should still be available if you want to use them as a working space
- Make sure you have installed the JDK and IntelliJ on whichever computer you will be using for this course. (Some students use personal laptops, some carry their working files on a thumb drive, some keep everything in the cloud and download onto whichever lab machine they are using. Whatever you choose, make sure the configuration will work for you now.)
- Test your setup by compiling and running a Hello World program
- If you have any technical difficulties, please contact one of us for help so we can get you set up before you get working on the first lab assignment.
- Project 1: ASCII Art
- Due Friday, January 26
- This assignment is to make sure you aren't having trouble installing and setting up your tools. It shouldn't be much more complicated than the hello world example from my slides. Please don't overthink it.
- You may want to use an online ASCII text generator rather than creating the ASCII art completely from scratch. (Updated 2024-01-24 to refer to different only ASCII art generator after reports of original page not working)
- Submit to Canvas before the deadline.
Week 2
- Monday, January 22: Continue Variables and Types
- Tuesday, January 23: No office hours for Brooke today (out with a sick kid)
- Wednesday, January 24: Expressions and Operators
- Friday, January 26: Describe project 2, look at ScannerDemo example
- Lab Session Exercise: Instructions
- Project 2: Guessing Numbers
- Due Monday, February 5
- ScannerDemo demonstrates some concepts you will use in this assignment.
Week 3
- Monday, January 29: Continue while loops
- Wednesday, January 31: do..while and for
- Live coding: draw triangle of starts with nested loops
- Friday, February 02: Go over quiz 2
- Describe point display assignment
- Project 3: Drawing with Points
- Due Monday, February 12
- Display.java
- Example uses of Display
Week 4
- Monday, February 05: Go over quiz 3
- Wednesday, February 07: Strings
- Friday, February 09: Go over quiz 4
Week 5
- Monday, February 12: More methods
- Method example: drawing horizontal line on Display
- Method example: printing triangles with stars
- Wednesday, February 14: Go over quiz 5
- Describe methods assignment
- Friday, February 16: Arrays
- Project 4: Welcome to Methods
- Due Friday, February 23
- MethodsPractice.java Start with this file and fill in the methods as described.
Week 6
- Monday, February 19: More arrays
- Tuesday, February 20: Brooke is home with a sick kid today.
- I'll try to hold my office hours over Zoom during the regular in person time, but will post an announcement on Canvas if that doesn't work out.
- Wednesday, February 21: More methods and arrays
- Friday, February 23: Searching and Sorting Arrays
- Project 5: Wordle Game
- Due Monday, March 4
- Wordle.java Start with this file and fill in the methods as described.
- WordleDictionary.java This file must be included in your project, since it contains the big array of words for the game.
- WordleTester.java Code that graders will use to automatically run some tests on your Wordle methods. If you'd like to run it yourself, place it in the src directory along with your Wordle.java file and tell IntelliJ to run the main method in that file.
Week 7
- Monday, February 26: Recursion and Factorial
- Wednesday, February 28:
Go over quiz 6 Brooke is out sick today, we'll go over the quiz on Friday
- Friday, March 01: Go over quiz 6
Week 8
- Monday, March 04: Go over quiz 7
- Wednesday, March 06: Review for midterm
- Friday, March 08: Midterm exam
- You may bring with you a single sheet of 8.5" x 11" paper. You may write on both sides. You may type it on a computer.
- The test is closed book, closed laptop, closed friends. You can only use the single sheet of paper and whatever is in your brains. You may also bring a calculator to perform basic arithmetic.
Spring Break
- No lectures, labs, or office hours during spring break
Week 9
Week 10
- Monday, March 25: More Objects and classes
- Begin Student class example
- Wednesday, March 27: Continue Student object example
- Friday, March 29: Student and Gradebook example
- We left off with the question: how can we increase the capacity of the gradebook?
- Project 7: Dish and Menu Objects
- Due Friday, April 12
- Note that this is a big project, so I recommend you finish Dish.java by April 5 so you have enough time to finish Menu.java
- FoodConstants.java Use the constants in this class for values that haven't been set yet, food groups and menu sections.
- You must write Dish.java yourself. No template code for that class.
- Menu.java Menu skeleton code for you to fill in once you have implemented Dish.java
- DishMenuTester.java Testing code for your classes
Week 11
- Monday, April 01: Describe Dish/Menu assignment
- Wednesday, April 03: * Lecture is relocated to PAIS 1100 through
April 12 end of term *
- Searching for student, removing from gradebook
- Friday, April 05: Enums
Week 12
* Monday, April 08: Brooke is out of town, but section leaders will be at the lecture.
* Tuesday, April 09: Brooke is still out, so her office hours are canceled
* Wednesday, April 10: Rock paper scissors example
* Friday, April 12: Go over quiz 8
* Towers of Hanoi
Week 13
- Monday, April 15: Describe particle simulation project
- Wednesday, April 17: Lights out solution
- Friday, April 19: Go over quiz 9
- Project 8: Particle Simulator
Week 14
- Monday, April 22: Describe maze project
- Wednesday, April 24: Begin preview of more advanced topics you'll learn in CS251
- Friday, April 26: Inheritance
- Project 9: Maze Exploration
- Due Monday, April 29
- MazeCell.java This is the recursively defined data type used to build the maze.
- MazeMain.java Fill in the constants in this file
- MazeUtilities.java Methods to generate mazes and test solution paths. Do not change it.
Week 15
- Monday, April 29: Dish/Menu solution
- Wednesday, May 01: Review for final
- Friday, May 03: Final exam (during regular lecture time/location)
- You may bring with you a single sheet of 8.5" x 11" paper. You may write on both sides. You may type it on a computer.
- The test is closed book, closed laptop, closed friends. You can only use the single sheet of paper and whatever is in your brains. You may also bring a calculator to perform basic arithmetic.
Finals Week
- You took your final last week, so go deal with your other classes now. (No one really wanted to take a final at 7:30am on a Friday, anyway.)
- It's finals week, so I won't be having my usual office hours, but will be checking my email and Canvas messages.