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:
Monday 2pm-4pm in person,
Friday 2pm-4pm via Zoom,
or by appointment
Lectures
Lectures are 11:00 am - 11:50 am MWF in Northrop Hall (Earth&Plan Sci) 122
Labs and Section Leaders
Lab 001 (CRN 75341)
- Time: 12:30 pm - 1:20 pm R
- Location: Mitchell Hall 108
- Section Leader: Finn Ellis
Lab 002 (CRN 48804)
- Time: 12:30 pm - 1:20 pm R
- Location: Woodward Lecture Hall 147
- Section Leader: Logan Nunno
Lab 003 (CRN 53879)
- Time: 2:00 pm - 2:50 pm T
- Location: Woodward Lecture Hall 147
- Section Leader: Quinn Sena
Lab 004 (CRN 49715)
- Time: 9:30 am - 10:20 am T
- Location: Woodward Lecture Hall 149
- Section Leader: Julia Marsh
Lab 005 (CRN 76781)
- Time: 2:00 pm - 2:50 pm R
- Location: Woodward Lecture Hall 147
- Section Leader: Noah Litz
Lab 006 (CRN 75343)
- Time: 12:00 pm - 12:50 pm W
- Location: Mitchell Hall 106
- Section Leader: Leo Wang
Lab 007 (CRN 76939)
- Time: 9:30 am - 10:20 am R
- Location: Woodward Lecture Hall 149
- Section Leader: Molly Palko
Lab 008 (CRN 76940)
- Time: 2:00 pm - 2:50 pm F
- Location: Woodward Lecture Hall 147
- Section Leader: Youssef Amin
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-08-26 with office hours
Handy References and Links
CS 152 Code Standards
Java
- Software
- Download Java from Oracle
- Download IntelliJ IDEA
- The free Community version will suffice for this course. Scroll down to find the correct link!
- You can get the Ultimate version for free if you register with an edu email address, but you don't need the extra features in this course.
- Reference Material
- Learn more online
Past exams
Lectures and Assignments
Week 1
- Monday, August 19: Welcome and Intro
- Wednesday, August 21:Variables and Types
- Friday, August 23: Continue IntelliJ intro, variables and types
- In lab this week: meet your section leader and labmates.
- 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 programming assignment.
- Project 1: ASCII Art
- Due Friday, August 30
- 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.
- Submit to Canvas before the deadline.
Week 2
Week 3
- Monday, September 2: Labor Day Holiday
- No lecture or office hours
- Wednesday, September 4: do..while and for
- Friday, September 6: Describe point display assignment
- Project 3: Drawing with Points
Week 4
- Monday, September 9: Go over quiz 2
- Wednesday, September 11: Go over quiz 3
- Friday, September 13: Go over quiz 4
- Project 4: Welcome to Methods
- Due Friday, September 27
- MethodPractice.java Start with this file and fill in the methods as described.
- We'll talk more about this project next week, but I'm posting it now in case you want to look at it over the weekend.
Week 5
- Monday, September 16: Go over quiz 5
- Describe methods assignment
- Wednesday, September 18: More methods
- Friday, September 20: Arrays
Week 6
- Monday, September 23: Brooke is out sick today, so no lecture
- I'll try to keep up with my email and Canvas messages.
- I plan to hold my office hours over Zoom during the regular in person time.
- Wednesday, September 25: Go over quiz 6
- Describe wordle assignment
- Friday, September 27: Searching and Sorting Arrays
- Project 5: Wordle Game
- Due Monday, October 7
- WordleGame.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. 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
Week 8
- Monday, October 7: Review for midterm
- Wednesday, October 9: 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.
- Friday, October 11: Fall Break
Week 9
- Monday, October 14: Peek at lights out game (to be posted this afternoon)
- Wednesday, October 16: Describe lights out project
- Friday, October 18: Objects and Classes
- Project 6: Lights Out
Week 10
- Monday, October 21: Discuss methods practice solution
- Wednesday, October 23: Continue wordle solution
- Continue Student object example
- Friday, October 25: Describe Dish/Menu assignment
- Project 7: Dish and Menu Objects
- Part 1 (just Dish functionality) is due Friday, November 1
- FoodConstants.java Use the constants in this class for food groups, menu sections, and values that haven't been set yet.
- You must write Dish.java yourself. No template code for that class.
- DishTester.java Testing code for your Dish implementation
- Part 2 (full project) is due Friday, November 8
- Continue with the files from part 1 when completing part 2.
- Menu.java Menu skeleton code for you to fill in once you have implemented Dish.java
- DishMenuTester.java Testing code for both your classes
- Note that this is a big project, which is why we split it into two submissions to make sure you have finished Dish.java with enough time to finish Menu.java
Week 11
- Monday, October 28: Begin Gradebook example
- Wednesday, October 30: continue Gradebook
- Friday, November 1: Enums
Week 12
- Monday, November 4: Rock Paper Scissors enum example
- Wednesday, November 6: FizzBuzz
- Friday, November 8: Don't use ChatGPT for your homework!
- Describe particle simulation project
- Project 8: Particle Simulator
Week 13
Week 14
- Monday, November 18: Describe maze assignment
- Wednesday, November 20: Go over quiz 10
- Begin preview of more advanced topics you'll learn in CS251
- Interfaces
- Friday, November 22:
- Project 9: Maze Exploration
- Due Monday, December 2
- 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, November 25:
- Wednesday, November 27:
- Friday, November 29: Thanksgiving break
Week 16
- Monday, December 2:
- Wednesday, December 4: Review for final
- Friday, December 6: 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.
- It's finals week, so I won't be having my usual office hours, but will be checking my email and Canvas messages.