CMSC 131 | ![]() |
Web Accessibility |
08/08/19 Course grades have been submitted to the University. You can view your grades (including your grade on the final exam) on the grades server (grades.cs.umd.edu).
08/02/19 The final exam will be on Wednesday 08/07/19 in our usual classroom. You will be given two hours for the final, so plan to be available from 11:05 until 1:05.
07/29/19 Project #7 has been posted.
07/28/19 Files for the lab on Thursday 08/01 can be found here.
07/25/19 Regarding Project #6: When implementing the equals method of the Entree class, please do it the "old" way, using a parameter of type Entree (instead of type Object). The tests were built to expect the old prototype (even though it is not the best way.)
07/21/19 Project #6 has been posted.
07/14/19 Files for the lab on Thursday 07/l8 can be found here.
07/12/19 Project #5 has been posted.
07/07/19 Files for the lab on Thursday 07/11 can be found here.
07/03/19 Project #4 has been posted.
07/01/19 Exam 1 has been graded. You can see the grading on Gradescope. TAs will go over the solutions tomorrow (Tuesday).
07/01/19 Files for the lab on Tuesday 07/02 can be found here.
06/23/19 Project #3 has been posted.
06/14/19 Project #2 has been posted.
06/11/19 If you'd like to have Eclipse draw a vertical line in the editor at the 80th column (so that you can easily check that your lines are not too long), see this link.
06/11/19 One-on-one tutoring is available for all CMSC131 students this summer via "The Iribe Initiative for Inclusion and Diversity". Tutors will be able to help with general concepts, but will not help with project questions. If you'd like to sign up for tutoring, begin here: http://go.umd.edu/TutorRequest.
06/11/19 More "Study Questions" have been posted -- sorry for the delay.
06/05/19 Project #1 has been posted.
05/31/19 The coding examples from today's lecture are now available on the class webpage (look in the "Schedule" tab). You should download the zipfile and import it into Eclipse the same way you did for Project #0. All examples presented in the lectures will be made available to you in this way.
05/27/19 The first day of class is Tuesday 05/28. Be sure to attend!
05/27/19 This is the class webpage for CMSC131. Please check here often (at least once a day) for important class announcements.
This is a first programming course for Computer Science majors with a focus on object-oriented programming. The goal of the course is to develop skills such as program design and testing as well as the implementation of programs using a graphical IDE. All programming will be done in Java.
Course Coordinator: Fawzi Emad
Recommended Text:
There is no required book for this course. There are many excellent introductory books on programming in Java. One that
I can recommend is Java Foundations
Older editions of this book are nearly identical to the latest edition, and you can find them sold cheaply online.
There will be eight programming projects and other assignments to be completed during the lab sessions. Some are considered "closed" assignments which you must complete by yourself and others are considered "open" assignments where collaboration is permitted. (More information about the open policy will be provided in class and can be found in the Policy Regarding Open/Closed Projects.) There will also be two midterms, a final exam, and occasional quizzes.
All assignments can be done on the machines of your choice. You are welcome to do the work on a home computer if you have one. There should not be any machine-specific dependencies in your code. If we are not able to run your program because there is a difference between your and our computer environments, you must work with us to get your program to work in our environment. You are expected to use the Eclipse IDE for all programming assignments.
All assignments must be submitted before 11pm on the day they are due. They are to be submitted electronically according to instructions given with the assignments. Late assignments will be strictly penalized. Exceptional circumstances will be considered only if discussed with the instructor before the assignment is due. Late assignments will have points deducted as follows:
Final grades will be computed according the following weights. (These weights are tentative and subject to future adjustment.)
Percentage | Component | 25% | Projects (8) [The weights of the individual projects will vary. Longer/harder projects will be worth more points.] |
---|---|
15% | Lab assignments (quizzes & exercises to be completed during your discussion sessions) |
15% | Midterm #1 |
15% | Midterm #2 |
30% | Final Exam |
You need to keep backups of your projects as you develop them. No extensions will be granted due to hardware failures or because you accidentally erased your project. Feel free to use the submit server as a backup tool by submitting often. You can also use tools like git, etc. Do not post code in any online system that is accessible to others (e.g., GitHub).
The following are examples of academic integrity violations:
The Department of Computer Science takes the student course evaluations very seriously. Evaluations will usually be open during the last few weeks of the course. Students can go to www.courseevalum.umd.edu to complete their evaluations.
Date | Brief Description | Lecture Slides | Coding Examples |
---|---|---|---|
05/28 | Course intro; Eclipse demonstration | Lecture 01 | |
05/29 | Computer Systems (hardware, software), RAM, data storage, programming languages | Lecture 02 | |
05/31 | Compilers/interpreters, intro to Java, local variables, primitive types | Lecture 03 | 131Summer19Lec03Examples.zip |
06/03 | Strings, concatenation, more about types, Scanner, arithmetic operators | Lecture 04 | 131Summer19Lec04Examples.zip |
06/05 | Escape sequences, integer division, comparison and equality operators, comparing objects, if and if-else statements, logical operators, nesting if and if-else statements, "else if" style | Lecture 05 | 131Summer19Lec05Examples.zip |
06/07 | Programming errors, variable scope and intialization, choosing identifiers, named constants, intro to "repetition" | Lecture 06 | 131Summer19Lec06Examples.zip |
06/10 | While loops, do-while loops, for loops, nested loops | Lecture 07 | 131Summer19Lec07Examples.zip |
06/12 | More nested loops, increment/decrement operators, alternate assignment operators, operator precedence, static methods | Lecture 08 | 131Summer19Lec08Examples.zip |
06/14 | More static methods; Project #2 overview; short-circuiting; casting with primitives; What are objects? | Lecture 09 | |
06/17 | Java classes; instance variables, instance methods; memory diagrams (reference variables vs. primitives); assignment with references; garbage collection; == vs. equals | Lecture 10 | 131Summer19Lec10Examples.zip |
06/19 | Continue example of "typical" Java class: return statements, constructors, equals method, toString; static vs. instance methods | Lecture 11 | 131Summer19Lec11Examples.zip |
06/21 | Summary and review of variables (local, instance, static); Overview and intro to project #3 | Lecture 12 | 131Summer19Lec12Examples.zip |
06/24 | Code correctness, formal verification, testing, JUnit | Lecture 13 | |
06/26 | Memory diagram for method calls, Java keyword "this"; Public vs. private visibilities; API; data encapsulation | Lecture 14 | 131Summer19Lec14Examples.zip |
06/28 | Commenting; floating point error; packages; libraries; API for String and Math classes | Lecture 15 | 131Summer19Lec15Examples.zip |
07/01 | Break; Continue; Exception Handling | Lecture 16 | 131Summer19Lec16Examples.zip |
07/03 | More exception handling (multiple catch blocks, finally); Arrays | Lecture 17 | 131Summer19Lec17Examples.zip |
07/05 | Holiday -- NO CLASS | ||
07/08 | More arrays: copying, "resizing", arrays of references; Mutability, StringBuffer, Deep vs. Shallow copies | Lecture 18 | 131Summer19Lec18Examples.zip |
07/10 | Privacy leaks, Two dimensional arrays (ragged) | Lecture 19 | 131Summer19Lec19Examples.zip |
07/15 | Rectangular 2-D arrays; Using the Eclipse Debugger; writing better tests (corner cases); Intro to Java Interfaces | Lecture 20 | 131Summer19Lec20Examples.zip |
07/17 | Java interfaces; polymorphism; wrappers (including Integer, Double, etc.) | Lecture 21 | 131Summer19Lec21Examples.zip |
07/19 | More interfaces; method overloading; ternary operator; switch statements | Lecture 22 | 131Summer19Lec22Examples.zip |
07/22 | Intro to inheritance; polymorphism via extension; overriding vs. overloading; Object class; correct equals method | Lecture 23 | 131Summer19Lec23Examples.zip |
07/24 | Package visibility; Java from the "command line"; Javadoc utility; Overview of abstract data types and Java Collections Framework; ArrayList | Lecture 24 | |
07/26 | ArrayList example; for-each loops; Intro to asymptotic complexity | Lecture 25 | 131Summer19Lec25Examples.zip |
07/29 | Intuition for thinking about asymptotic complexity; Big-O notation; lots of examples | Lecture 26 | |
07/31 | Intro to recursion | Lecture 27 | 131Summer19Lec27Examples.zip |
08/02 | More examples of recursion, including those relying on a "helper" method | Lecture 28 | 131Summer19Lec28Examples.zip |
08/05 | Review for final | Lecture 29 | 131Summer19Lec29Examples.zip |
Fawzi Emad
Email:
Office: IRB 2212
Office Hours: MWF After class
Note: During the Summer, TA office hours will be held in the "open area" on the second floor of the Iribe Center. (When you exit the elevator, head to the left.)
Responsibilities | Office Hours | ||
---|---|---|---|
Carolin Arnold | Co-discussion leader and grader | Tu/Th After class | |
Ugur Koc | Co-discussion leader and grader | Tu/Th 10:00AM - 11:00AM |
The following web pages provide detailed references to information about Java.
Below are collections of questions and practice problems that are designed to help you to learn the course material. These exercises are not being collected or graded. Answers are provided, but please try your best to solve each problem before looking at the solution! The list will be updated as the semester progresses.
Disclaimer: Your primary resource for studying should be the notes that you have taken during lectures! There will be questions on quizzes and exams that are not in any way represented in this study list. There will be questions on this study list that are not in any way represented on quizzes or exams. Please be aware that exam questions tend to combine more elements into a single question and many of the questions on the list are simpler than questions you will see on your exams. You may discuss these questions openly with anyone, including your classmates. If you are unsure about how the answer to any particular question is obtained, please drop by office hours for help. That's why we're here!
Part 1: | Questions01 | Answers01 |
---|---|---|
Part 2: | Questions02 | Answers02 |
Part 3: | Questions03 | Answers03 |
Part 4: | Questions04 | Answers04 |
Part 5: | Questions05 | Answers05 |
Part 6: | Questions06 | Answers06 |
Part 7: | Questions07 | Answers07 |
Part 8: | Questions08 | Answers08 |
Part 9: | Questions09 | Answers09 |
Part 10: | Questions10 | Answers10 |
Part 11: | Questions11 | Answers11 |
Part 12: | Questions12 | Answers12 |
Part 13: | Questions13 | Answers13 |
Part 14: | Questions14 | Answers14 |
To submit a project, go to the "Java" perspective in Eclipse. Right click on the project folder (e.g., p1) and select "Submit Project" from the pull-down menu. If you do not see the "Submit Project" option then your copy of Eclipse does not contain the class plug-ins. In this case, please see the Eclipse installations instructions on the Resources page, or drop by TA office hours for help.
You may submit many times (we grade only the last submission). You can check the status of your submissions by visiting the Submit Server Home Page and entering your University Directory ID and password.
Important: Your grade for each project will be based on the greater value of two scores: (1) The score on the very last submission prior to the deadline; (2) The score minus 20% on the very last submission prior to the late deadline (up to 24 hours late).
Click the name of a project below to see the project specification.
Project Name | Due Date |
---|---|
Hello World! | Tuesday 06/04, 11:00PM |
Orioles Baseball | Thursday 06/13, 11:00PM |
Flags of the World | Sunday 06/23, 11:00PM |
Medieval Soldiers | Wednesday 07/03, 11:00PM |
Mandelbrot Set | Thursday 07/11, 11:00PM |
Poker Simulator | Saturday 07/20, 11:00PM |
Cafe 131 | Monday 07/29, 11:00PM |
Fish Club | Tuesday 08/06, 11:00PM |