CMSC 335 at the University of Maryland Global Campus studies object-oriented and concurrent programming using features of Java.
UMGC's goal for the course is to design, implement, test, debug and document complex, robust programs in an object-oriented language.
It explores OOP concepts such as composition, classification and polymorphism, and the principles of concurrent programming: task synchronisation, race conditions, deadlock, threads and event-driven graphical user interface programs. Projects are implemented in Java.
The prerequisite is CMSC 315 (or CMSC 350). Concurrency is where many capable programmers struggle: bugs appear only sometimes, depend on timing, and vanish when you add a print statement to look for them.
Course at a Glance
| Item | Details |
|---|---|
| University | University of Maryland Global Campus (UMGC) |
| Course code | CMSC 335 (3 credits) |
| Level | Undergraduate, upper level |
| Prerequisite | CMSC 315 (or CMSC 350) |
| Language | Java |
| Credit note | Credit for only one of CMSC 300 or CMSC 335 |
| Typical work | Multi-part Java projects with design documentation and test evidence |
What CMSC 335 Covers
| Topic | What it means |
|---|---|
| Composition and classification | Building objects from parts; organizing classes into hierarchies |
| Polymorphism | Writing code against general types |
| Threads | Running tasks at the same time |
| Synchronisation | Coordinating threads that share data |
| Race conditions and deadlock | The classic concurrency failures and how to avoid them |
| Event-driven GUIs | Programs that respond to user actions, without freezing |
Key Concepts Explained
Race Conditions
A race condition occurs when the result depends on the timing of threads that share data.
Example: Two threads each run count++ 1,000 times on a shared counter. The expected total is 2,000, but runs often give less, because count++ is a read, an add and a write, and the threads interleave. Making the method synchronized or using AtomicInteger fixes it.
Deadlock
Deadlock happens when threads wait on each other forever.
Example: Thread 1 locks account A then waits for B; thread 2 locks B then waits for A. Neither can continue. Always acquiring locks in the same order (for example, by account number) prevents the cycle.
Keeping the GUI Responsive
In Swing, the event dispatch thread handles drawing and user input. Long work on that thread freezes the window, so it belongs on a background thread (for example with SwingWorker), with results passed back to update the interface.
Typical Assignments and How to Approach Them
| Assignment type | What it tests | How to approach it |
|---|---|---|
| Multi-stage project | Growing a design over time | Design classes for change; keep earlier stages working |
| Threaded simulation | Concurrency control | Identify shared data first, then protect it |
| GUI program | Event-driven design | Keep long tasks off the event thread |
| Documentation and tests | Robustness | UML, a test plan and lessons learned |
Debugging Concurrent Programs
Timing bugs resist ordinary debugging. A more reliable approach is to reason about the code: list every piece of shared mutable data and check that each access is protected by the same lock or is thread-safe by design.
Prefer higher-level tools from java.util.concurrent, such as thread pools, concurrent collections and locks with timeouts, over hand-built synchronisation. Running a test many times in a loop can expose a race that appears only once in a hundred runs.
Composition and Classification in Design
UMGC names composition, classification and polymorphism as the OOP concepts explored. Classification organizes types into hierarchies, while composition builds complex objects from simpler parts.
Example: In a port simulation, a Ship class is classified into CargoShip and PassengerShip. A Port is composed of docks, a queue of waiting ships and a pool of workers. Each dock runs in its own thread, so the design brings OOP and concurrency together.
Designs like this reward careful thought about which objects are shared. The dock threads all touch the waiting queue and the worker pool, so those are the places to synchronise; each ship's own data, used by one dock at a time, may need no locking at all.
Documenting that reasoning shows the marker you designed for concurrency rather than adding locks by trial and error.
Where Students Get Stuck
- Unprotected shared state. Find it before you write threads.
- Over-synchronising. Locking everything can serialize the program or cause deadlock.
- Frozen GUIs. Never run long tasks on the event dispatch thread.
- Weak documentation. Explain your concurrency design, not only your classes.
Study Tips for CMSC 335
- Draw a timeline of two threads to see how interleaving causes errors.
- Learn the main classes in
java.util.concurrent. - Keep the design flexible; later project stages often extend earlier ones.
- Write the test plan alongside the code, not after.
How We Help with CMSC 335
Send the project instructions, your code, UML and the rubric. A Java tutor can explain OOP and concurrency concepts, help you track down race conditions or deadlocks, review your documentation, or provide a commented model of a similar problem to study.
GradeEssays is independent of the University of Maryland Global Campus. Our help is tutoring and model material within UMGC's academic integrity policy; code you submit must be your own.
Get Your CMSC 335 Concurrent Code Under Control
Share the project and your attempt. A Java tutor explains synchronisation and design step by step.
Start My Concurrency HelpFree revisions · Full refund if late · Written from scratch for your order
Frequently Asked Questions
UMGC lists CMSC 315 (or CMSC 350).
No. UMGC states that students may receive credit for only one of CMSC 300 or CMSC 335.
Java. UMGC states that programming projects are implemented in Java.
Task synchronisation, race conditions, deadlock, threads and event-driven GUI programs.
They depend on timing. Reason about shared data and protect every access, rather than relying on test runs alone.
We explain, help debug and provide model examples of similar problems, but the code you submit must be your own.