UNC COMP 301 - F26/Lec 1 - Intros, Syllabus, 301 Overview, Java Workflow & Maven
Overview
Muhammad Sayeed Ghani introduces UNC COMP 301, Foundations of Programming, explaining how the course moves beyond individual programming tasks toward modular, extensible, maintainable applications. He outlines the syllabus, nine-assignment grading structure, and modules on object-oriented programming, testing, design patterns, JavaFX, and asynchronous programming, then demonstrates Java compilation, dependencies, packaging, and Maven project workflows.
Key takeaways
- COMP 301 shifts the emphasis from solving isolated programming problems to writing modular, extensible, clear, and maintainable applications that other programmers can use.
- The course has nine assignments worth 5% each and drops the lowest score; assignments typically allow seven days, with three grace days that make a submission late.
- Java compiles .java files into platform-independent .class bytecode, which a Java Virtual Machine runs on supported platforms.
- Maven standardizes project structure with src/main/java, src/test/java, target for generated output, and pom.xml for build configuration and dependencies.
- Java dependencies such as JUnit and JavaFX are identified in Maven by group ID, artifact ID, and version, while command-line compilation can locate precompiled dependencies through the classpath.
- COMP 301’s later modules apply software design principles through design patterns, JavaFX with Model-View-Controller, and asynchronous programming concepts such as deadlocks and race conditions.
Chapters
- Muhammad Sayeed Ghani introduces COMP 301 as Foundations of Programming and notes that the course name is sometimes incorrectly listed as structured or organized code.
- Ghani gives office hours as Tuesdays and Thursdays, 11:30 a.m. to 12:30 p.m., in Fred Brooks Building room 144.
- The course has two TAs, including Yraj as the main TA, plus undergraduate TAs whose office hours are expected to begin the following week.
- Students use a QR code survey to share their year, majors, minors, COMP 210 background, programming confidence, and Java experience.
- Ghani expects COMP 301 students to have COMP 210 credit and established programming skills, while noting that experience with Python or another object-oriented language can help students pick up Java.
- Canvas provides a public-facing Simple Syllabus, but Ghani directs students to the full course outline in the Canvas files directory because the catalog course name is incorrect.
- Ghani recommends The Mythical Man-Month as an accessible software engineering classic and cites the Gang of Four Design Patterns book as a useful reference, not a required purchase.
- Lecture slides appear first in a prep folder and are moved to a final folder after updates; students should contact Ghani if they are not receiving Canvas announcements.
- The course has nine programming assignments, each worth 5%, and the lowest assignment score is dropped; both midterms and the final exam are required.
- Assignments are expected to be more challenging and longer than COMP 210 work, usually have seven days for completion, and allow three grace days that mark submissions late.
- Assignment 0 is an ungraded setup exercise; IntelliJ is recommended, Google Java Format is required, and GitHub submissions are connected to Gradescope.
- Canvas, GitHub, Gradescope, Piazza, and CSXL support course communication, submissions, questions, and online office hours.
- After COMP 210 and COMP 283, students encounter software-oriented courses such as COMP 301 alongside hardware-oriented courses such as COMP 311.
- Ghani describes COMP 301 as a foundational gateway with more than 30 courses listing it as a direct prerequisite.
- The course sits near the application layer but serves as a foundational software course, preparing students to build substantial applications.
- Module 1 reviews encapsulation, interfaces, inheritance, and polymorphism, then develops concepts such as aggregation, composition, and abstract classes.
- Module 2 covers errors, exceptions, and unit testing, including how to use tests to check that software behaves as intended before deployment.
- The first midterm follows the object-oriented programming module, and the course schedule is described as a rough estimate because Ghani is teaching COMP 301 for the first time.
- Module 3 introduces design patterns as reusable solutions to recurring software architecture problems, including iterator, decorator, and factory patterns.
- The user interface module uses JavaFX and Model-View-Controller architecture; assignments 8 and 9 include a complete interactive program and a game.
- The final module introduces asynchronous programming and concurrency risks such as deadlocks and race conditions; the final exam is cumulative, with emphasis on later course material.
- Traditional compiled languages such as C and C++ produce platform-specific machine code, while interpreted languages such as Python execute source through an interpreter.
- Java combines compilation with portability by compiling source code to bytecode rather than directly to a target machine’s executable code.
- A Java Virtual Machine runs the bytecode on a supported platform, avoiding the need to compile a separate application for every target.
- The Java Development Kit includes the Java compiler, which converts .java source files into .class bytecode files.
- End users can run Java bytecode with a JVM without installing the full development kit or receiving the original source code.
- Ghani explains that bytecode can often be decompiled into source-like code, though names such as local variables may not be preserved.
- Larger Java projects combine multiple source files with external dependencies, including JUnit for testing and JavaFX for graphical interfaces.
- Dependencies are commonly distributed as JAR archives; applications can package code and dependencies together, though a standalone “fat JAR” is not always necessary.
- Packaging creates a distributable artifact from compiled code, while source code is generally excluded from the delivered package.
- IntelliJ can create projects using its own build system or Maven; a Maven project includes a standard source layout and a pom.xml file.
- Maven separates production code under src/main/java, resources under src/main/resources, and tests under src/test/java.
- The POM, or Project Object Model file, configures project information, build settings, and dependencies.
- Running a Java class from IntelliJ triggers Maven-related build steps behind the scenes, including compilation and execution.
- Compiled .class files appear in Maven’s target directory, organized to reflect the source package structure.
- The Maven clean lifecycle removes generated output, including the target directory, and IntelliJ can display decompiled code when a compiled class is opened.
- Ghani demonstrates compiling a single source file with javac and running the resulting class with the java command.
- The Java source file produces a corresponding .class file; a terminal hex dump can reveal bytecode data, though it is not normally human-readable.
- The command-line demonstration shows what an IDE does behind the scenes, even though students are not expected to use the terminal frequently.
- When one Java class depends on another, javac can compile both source files together or compile a dependency separately and locate it through the classpath option, -cp.
- A classpath can include output directories and JAR dependencies; Maven’s target folder holds generated output while the POM records project configuration and dependency coordinates.
- Maven dependencies are identified by group ID, artifact ID, and version; source and target Java versions can differ to support backward compatibility.
- Java package names map to directory structures, and using a distinctive package name helps identify code when it is distributed.
- A fully qualified class name specifies its entire package path; an import statement lets code refer to that class more concisely.
- Ghani closes by framing the Maven build process as the steps that turn project files into a distributable JAR, with further lifecycle goals planned for the next class.
Transcript excerpt
0:00 Right. Uh, good morning everyone. I hope I'm audible all the way in the back. Not sure these new mics how did they work, but hopefully that works pretty well. All right, so uh, welcome to comp 301, foundations of programming. Also sometimes incorrectly referred to as structure/organize on code. I'll speak about that in a minute. Uh so we'll go over um the first year of class stuff today. I'm Sani and I'm sure most of you know me already from comp 210. Uh but for those of you who don't know me uh we'll go through a round of introductions. Um and then we'll take a look at the core syllabus. Uh give you a bit of an overview of 301.
0:49 And then uh depending on how much time we have left uh we'll take a look at some actual code and to take a look at something called Maven. I'm not sure if anybody is familiar with that but that's build automation tool that we'll be using this semester and so we'll spend some time on that and maybe if you're done with that we can stop a little early today. All right so let's get started. Uh before I start uh this is the first time I'm teaching this course. So I would like to acknowledge uh the previous faculty members who have actually helped develop this course especially much of the course contents in the lectures were actually drawn from them. Some of it is mine but a good portion is from previous faculty members. Uh I really appreciate their uh contribution.
1:36 Um so those of you who don't know me I presume there are some of you over here. Um so I'm say and um I there is another gentleman who has pretty much exactly
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Muhammad Sayeed Ghani.