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:
Tuesday 2pm-4pm via Zoom,
Friday 1pm-3pm in person,
or by appointment
Lectures
Lectures are 10:00 am - 10:50 am MWF Centennial Engineering Center 1041
Labs and Section Leaders
Lab 001 (CRN 32289)
- Time: 11:00 am - 11:50 am Monday
- Location: Centennial Engineering Center 1030
- Section Leader: Molly Palko
Lab 002 (CRN 32290)
- Time: 11:00 am - 11:50 am Wednesday
- Location: Mechanical Engineering 210
- Section Leader: Logan Nunno
Lab 003 (CRN 32291)
- Time: 11:00 am - 11:50 am Friday
- Location: Centennial Engineering Center 1028
- Section Leader: Leo Wang
Lab 004 (CRN 32292)
- Time: 12:00 pm - 12:50 pm Monday
- Location: Centennial Engineering Center 1032
- Section Leader: Youssef Amin
Lab 005 (CRN 60023)
- Time: 12:00 pm - 12:50 pm Wednesday
- Location: Centennial Engineering Center 1030
- Section Leader: Julia Marsh
Lab 006 (CRN 36404)
- Time: 12:00 pm - 12:50 pm Friday
- Location: Centennial Engineering Center 1032
- Section Leader: Noah Litz
Lab 007 (CRN 44039)
- Time: 9:00 am - 9:50 am Wednesday
- Location: Centennial Engineering Center 1028
- Section Leader: Finn Ellis
Lab 008 (CRN 60329)
- Time: 9:00 am - 9:50 am Friday
- Location: Centennial Engineering Center 1028
- Section Leader: Quinn Sena
Lab 009 (CRN 81411)
- Time: 11:00 am - 11:50 am Friday
- Location: Centennial Engineering Center 1032
- Section Leader: Ethan Begay
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.
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, January 20: Martin Luther King Day
- University Holiday: No classes or labs today
- Wednesday, January 22: Welcome and Intro
- Friday, January 24: Variables and Types
- In lab this week (if your lab meets): 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, January 31
- 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, February 3: Continue with while loops
- Wednesday, February 5: Go over quiz 2
- Coding Standards
- The projector wasn't working, so we used the whiteboard. Please look at the coding standards slides for better formatted examples.
- Friday, February 7: Switch statement
- Project 3: Drawing with Points
Week 4
- Monday, February 10: Describe Project 3
- Wednesday, February 12: Strings
- Friday, February 14: Go over quiz 3
Week 5
- Monday, February 17: Go over quiz 4
- Wednesday, February 19: Go over quiz 5
- Friday, February 21: More methods
- Coding example printing shapes with stars
- Project 4: Welcome to Methods
- Due Monday, March 3
- MethodsPractice.java Start with this file and implement the methods as described.
Week 6
Week 7
- Monday, March 3: Describe wordle assignment
- Wednesday, March 5: Go over quiz 7
- Friday, March 7: Merge Sort Code
- Lecture is on Zoom today (link on Canvas)
- Project 5: Wordle Game
- Due
Tuesday, March 11 Friday, March 14
- 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. 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 8
- Monday, March 10: Go over quiz 8
- Wordle deadline is extended
- Wednesday, March 12: Review for midterm
- Friday, March 14: 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
- Monday, March 24: Describe lights out project
- Wednesday, March 26: Passing array to method example
- Friday, March 28: Continue objects
- Project 6: Lights Out
Week 10
- Monday, March 31: Continue Student example, begin Gradebook
- Wednesday, April 2: Continue Gradebook example
- Friday, April 4: Brooke is home with a sick child. Lecture is cancelled.
Week 11
- Monday, April 7: Describe Dish/Menu assignment
- Brooke is out sick and teaching remotely today. Zoom link is on Canvas.
- Wednesday, April 9: Go over quiz 9 (Oops, didn't get to this!)
- More Gradebook and general object discussion
- Friday, April 11: Actually go over quiz 9 this time
- Project 7: Dish and Menu Objects
- Part 1 (just Dish functionality) is due Monday, April 14
- DishConstants.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 Monday, April 21
- Continue with the files from part 1 when completing part 2.
- Menu.java (On Canvas) Menu skeleton code for you to fill in once you have implemented Dish.java
- DishMenuTester.java (On Canvas) 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 12
- Monday, April 14: Rock paper scissors enum example
- Wednesday, April 16: FizzBuzz
- Friday, April 18: Methods practice solutions
Week 13
Week 14
- Monday, April 28: Describe maze exploration project
- Wednesday, April 30: Begin preview of more advanced topics you'll learn in CS251
- Friday, May 2: Go over quiz 10
- Project 9: Maze Exploration
- Due Monday, May 5
- 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, May 5: More inheritance
- Wednesday, May 7: Review for final
- Technical difficulties today, so no lecture recording
- Friday, May 9: 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.