Bryn Mawr College
CMSC 113 Computer Science 1
Fall 2020
Course Materials
Prof. Deepak Kumar
General Information
Instructor(s)
Deepak Kumar XX
202 Park Science Building
526-7485
dkumar at brynmawr dot edu
https://cs.brynmawr.edu/~dkumar/
Lecture Hours: Tuesdays & Fridays from 2:40p to 4:00p (Zoom Meeting ID: 945 2952 2324, you have the password)
Office Hours: Fridays 1:40p to 2:30p (Zoom only) Meeting ID: 953 9822 4538 (ask me for password), or by appointment.
Lecture Room: Room 200 Park Science Building REMOTE ONLY.
Lab: Students should only register for ONLY ONE of the labs shown below:
- Lab Section A:
Tuesdays 4:10p to 5:00p We are now remote-only.
- Lab Section B:
Fridays Fridays 1:40p to 2:30p We are now remote only.
- Join Zoom Meeting
https://brynmawr-edu.zoom.us/j/95398224538?pwd=MlJRUzl2cmR5emhBbVdTNnZoL3ZPdz09
- Meeting ID: 953 9822 4538
Passcode: 19010
-
Note: There are no scheduled Lab Hours. You will receive a Weekly Lab after on Tuesdays. You will need to complete the lab by Friday of that week and send an e-mail to your inteructor. No submissions are required for labs.
Laboratories
- Computer Science lab Room 230 (Science Building)
- You will also be able to use your own computer to do labs for this course.
Lab TAs: The following Lab Assistants will be available during the week for assistance on Lab assignments:
- Nitisha Bhandari (nbhandari)
- Sarah Coufal (scoufal)
- Anna Goncharova (agoncharov)
- Al Mazzoli (amazzoli)
- Faith Meecham (fmeacham)
- Judy Wang (jwang6)
- Angie Yang (axyang)
TA Schedule
Please see the class Piazza for TA Hours.
Class Piazza: Click here to go to class Piazza.
Texts & Software
Main Text (Required): Introduction to Programming in Java (Second Edition) by Robert Sedgewick & Kevin Wayne. Addison-Wesley 2017. Available in Campus Bookstore, or purchase online from Amazon.com (Price on August 19, 2020 is $35.99 for e-text, $65.00 paperback). Book's companion website: Click here.
Software: We will be programming in Java on Windows/Apple Mac computers. The CS Labs all have Windows computers that will have the software installed in them. We will also provide SPECIFIC instructions for you to install the Java environment on your own computers so you will be able to work on them. More details in the first week of class. Tools we will be using: OpenJDK-11, Visual Studio Code (VS Code), Git Bash, Dropbox, Piazza, and Zoom. |
 |
Class Piazza: Click here to go to class Piazza.
Syllabus
Course Description: This is an introduction to the discipline of computer science, suitable for those students with a mature quantitative ability. This fast-paced course covers the basics of computer programming, with an emphasis on program design and problem decomposition. Graduates of this course will be able to write small computer programs independently; examples include data processing for a data-based science course, small games, or other data-intensive applications. No prior computer programming experience is necessary or expected. Prerequisite: Must pass either the Quantitative Readiness Assessment or the Quantitative Seminar (QUAN B001). Approach: Course does not meet an Approach, Quantitative Methods (QM), Quantitative Readiness Required (QR); Haverford: Quantitative (QU). Enrollment Limit; 24: Frosh (First Year) Spaces 20; [Note: These limits have changed for in-person classes and are dictated by allotted classroom spaces.]
Topics
- Elements of Programming: Basic Java program structure, data types, conditionals & loops, arrays, input and output.
- Functions and Modules: Defining functions, libraries and clients, recursion.
- Object-Oriented Programming: Using data types, creating data types, designing data types.
- Algorithms: Performance, searching, sorting.
Enrollment Criteria: All students must fill out questionnaire:Click here to go to Questionnaire.
Lab Attendance: Attendance in Lab is REQUIRED. Students are not required to attend both labs, and will need to chose one out of the two scheduled labs.
Important Dates
September 1: |
Week 0 Session |
September 8: |
First class meeting |
October 9: |
Exam 1 |
November 13: |
Exam 2 |
December 8: |
Exam 3 |
Creating a Welcoming Environment
All members of the Instruction Staff are dedicated to the cause of improving diversity, equity, and inclusion in the field of computing, and to supporting the wellness and mental health of our students.
Diversity and Inclusion
It is essential that all members of the course community – the instructor, TAs, and students – work together to create a supportive, inclusive environment that welcomes all students, regardless of their race, ethnicity, gender identity, sexuality, or socioeconomic status. All participants in this course deserve to and should expect to be treated with respect by other members of the community.
Class meetings, lab sessions, office hours, and group working time should be spaces where everyone feels welcome and included. In order to foster a welcoming environment, students of this course are expected to: exercise consideration and respect in their speech and actions; attempt collaboration and consideration, including listening to opposing perspectives and authentically and respectfully raising concerns, before conflict; refrain from demeaning, discriminatory, or harassing behavior and speech.
Wellness
Additionally, your mental health and wellness are of utmost importance to the course Instruction Staff, if not the College as a whole. All members of the instruction staff will be happy to chat or just to listen if you need someone to talk to, even if it’s not specifically about this course.
If you or someone you know is in distress and urgently needs to speak with someone, please do not hesitate to contact BMC Counseling Serices: 610-526-7360 (610-526-7778 nights and weekends). If you are uncomfortable reaching out to Counseling Services, any member of the Instruction Staff will be happy to contact them on your behalf.
We understand that student life can be extremely difficult, both mentally and emotionally. If you are living with mental health issues such as anxiety, depression, ADHD, or other conditions that may affect you this semester, you are encouraged to discuss these with the Instructor. Although the details are up to you to disclose, the Instruction Staff will do their best to support and accommodate you in order to ensure that you can succeed this course while staying healthy.
Assignments
Sample Assignment Submission to see how all Assignments are to be submitted as a PDF file.
- Assignment#1 is posted (Due on Friday, September 25) Click here for details.
- Assignment#2 is posted (Due on Friday, October 2): Click here for details.
- Assignment#3 is posted (Due on Friday, October 16): Click here for details.
- Assignment#4 is posted (Due on Friday, October 30): Click here for details.
- Assignment#5 (This is for self-study. Not required to submit anything.) Click here. Required files: CreditCardValidation, shortlist, numbers.
- Assignment#6 (This is for self-study. Not required to submit anything.) Click here. Data File: eff_wordlist.txt
- Assignment#7 (Due on Tuesday, December 8 by start of class (from all time zones)): Click here. (Data file is not to be downloaded. See the handout for details)
Lectures
- Week 0
(September 1)
September 1: Course Overview for Virtual Shopping Week and Schedule Adjustment purposes. The meeting will run from 2:40p to 3:00p on Zoom (Meeting info will be e-mailed to you).
Lab#0: Lab#0 handout is posted (Click here). Please try and complete Lab#0 prior to the start of Week1. See videos below for installing VS Code, Java+Git Bash.
Video: Installing VS Code on Windows computers (4:01 min). (If prompted, use Passcode: GB@.J57$).
Installing OpenJDK+git-bashon Windows (9:04 min) (If prompted, use Password: 4%&L7z#7).
Installing OpenJDK+Bash on MacOS (~5 min) (If prompted, use Password: x=B#0wn+).
- Week 1 (September 8, 11) No in-person Labs this week due to COVID Level 2.
September 8: First class meeting. Course introduction. Learning basic commands in Command Line Interface (CLI), creating a file using VS Code, first Java programs.
Read: Section 1.1 from S&W.
Slides from today's class: Click here.
Lab#1: Please try and complete this lab AFTER today's class and before Friday's class. Use the handout that applies to you (Windows or Mac):
Lab#1 Handout: Windows Version
Lab#1 Handout: MacOS Version
September 11: Writing, editing, running simple Java programs. Your first Java program(s). What does "public static void main(String[] args)" and other stuff mean?
- Week 2 (September 15, 18)
September 15: Built-in types of data. Doing simple computations with int, and double. The boolen data type: boolean values, boolean expressions, comparison operations.
Read: Section 1.2 from S&W.
Lab#2: Click here. Complete this lab by start of class on Friday, September 18. Send en e-mail to your instructor when you have finished the lab.
Assignment#1 is posted (Due on Friday, September 25) Click here for details.
September 18: Library methods and APIs. The Math library. The boolen data type: boolean values, boolean expressions. Comparison operations.
Class Notes: Click here.
Program(s) from class: WindChill.java.
Read: Section 1.2 from S&W. For next week, start reading Section 1.3 from S&W.
- Week 3 (September 22, 25)
September 22: Conditionals and loops: if-, while-, and for- statements in Java. Typical use cases for conditionals and loops. Examples.
Read: Section 1.3 from S&W.
Class Notes: Click here.
Lab#3: Click here. Complete this lab by start of class on Tuesday, September 29.
Send en e-mail to your instructor when you have finished the lab to get credit.
September 25:
Conditionals and loops, contd. Examples. Simple counting loops, nested loops, computing using an infinite series (approximating PI).
Class Notes: Click here.
Program(s) from class: PI.java
Assignment#1 Solutions: Hours, ArrivalTime, GreatCircle.
Assignment#2 is posted (Due on Friday, October 2): Click here for details.
- Week 4 (September 29, October 2)
September 29: Nexted loops. More loop examples. Estimating probabilities using loops and Math.random(). Arrays: defining, creating, initializing, accessing.
Class Notes: Click here.
Programs from class: Rows, Prime, CoinToss.
Read: Start reading Section 1.4 from S&W.
Lab#4: Click here. Complete this lab by start of classon Tuesday, October 6.
Place the completed Lab Form in your dropbox folder and end en e-mail to your instructor when you have finished the lab to get credit.
Sample Assignment Submission to see how all Assignments are to be submitted as a PDF file.
October 2:
Arrays: defining, creating, initializing, accessing. Examples with arrays.
Class Notes: Click here.
Programs from class: None.
Assignment#2 Solutions: ElectionResults, Victory.
Read: Section 1.4 from S&W.
Assignment#3 is posted (Due on Friday, October 16): Click here for details.
- Week 5 (October 6, 9)
October 6: Review: Loop, arrays, conditionals. Switch statement as an alternative conditional. Examples from Lab 4, plus more.
Sample Exam 1: Exam, Exam Solutions (please refer to these after you rveiew the Exam).
Class Notes: Click here.
Starter Program for Assignment#3: USAPredictor.
October 9:
Exam 1 is today. (Download here!) <--- link is live now.
The Exam will be as a PDF Form that will be posted at 1:00p Eastern Time today. The completed exam should be returned to the shared dropbox folder by 6:00p Eastern Time on October 9, 2020. Late submissions will not receive ANY credit.
The exam will be designed as an 80-minute exam. All resources are permitted, but no assistance from another person.
- Week 6 (October 13, 16)
October 13: Exam Review.
Exam 1 Solutions: Click here.
Class Notes: None for today.
October 16:
Using the StdIn and StdOut libraries to do interactive and file I/O. Bash I/O redirection. Pipes.
Class Notes: Click here.
Read: Section 1.5 from S&W.
Lab#5: Click here. Please complete this lab by Tuesday, October 20. Nothing to submit. Just send an e-mail upon completion.]
- Week 7 (October 20, 23)
October 20:Using the StdDraw library to draw graphics: canvas, coordinate system, scaling the canvas. Drawing basic shapes: point, lines, circle, squares, rectangles, polygons. Visualizing data.
Class Notes: Click here.
Programs from class: Cat, Shapes, Lines, Circles, USA. (USA data file - save as USA.txt).
Read: Section 1.5 from S&W.
Lab#6: Click here. Please complete by Friday, October 23. Nothing to submit. Just send an e-mail upon completion.
Assignment#4 is posted (Due on Friday, October 30): Click here for details. Datafile (Tolstoy's War and Peace): Click here.
October 23: Doing graphics with StdDraw. Double-buffering to do smoooth animations.
Using trigonometry to compute 2-D coordinates.
Read: Section 1.5 from S&W.
Class Notes: Click here.
Programs from class: Line.
Week 8 (October 27, 30)
October 27: Functions: Terminology (signature, method, return type, method name, parameters/arguments, local variables, method body, return statement). Examples of several functions.
Read: Section 2.1 from S&W.
Class Notes: Click here.
Program(s) from class: Plot.
Lab#7 is posted. Click here. Due on Tuesday, November 3. Once done, please send and e-mail to Deepak (as usual).
October 30:
There will be no teaching in class today in support of the Haverford student strike. There will be a scheduled class meeting as a space for open conversation between students. Deepak will leave the meeting as soon as there are no more questions for him allowing you all to talk amongst yourselve freely. As of now, the class will resume with normal content on Friday, November 6. Lab#7 can now be completed by friday, Novemver 6. More information will be forthcoming on Wednesday, November 4.
- Week 9 (November 3, 6)
November 3: Election Day. College has declared today a holiday. Please vote if you are locally registered. College is providing shuttle vans.
November 6:
There will be a scheduled class meeting as a space for open conversation between students. We will also lay out a plan for the rest of the semester.
Read: Section 2.2 from S&W.
Lab#8: Click here. Data File: AAPL.txt. [This is for self-study. Not required to submit anything.]
Assignment#5 (This is for self-study. Not required to submit anything.) Click here. Required files: CreditCardValidation, shortlist, numbers.
- Week 10 (November 10, 13)
November 10: Static function libraries. Recursive functions.
Class Notes: Click here.
Read: Sections 2.2 and 2.3 from S&W.
November 13:
A very quick introduction to Recursion. Data Types and Objects. The Java Color, Picture, and String library. Exam 2 is today.
Class Notes: Click here.
Self-Study Tutorial on Recursion: Click here. [This is for self-study. Not required to submit anything.]
Lab#9: Click here. Image Files: Paul Pogba, Grace Hopper. [This is for self-study. Not required to submit anything.]
Read: Section 3.1 from S&W.
- Week 11 (November 17, 20)
November 17: Objects and Object-Oriented Programming. A deep dive into Java String class.
Class Notes: Click here.
Programs from class: Search (Data files: tree.txt, raven.txt, Obama2009.txt, Trump2019.txt), Palindrome, VerifyPassword.
Assignment#6 (This is for self-study. Not required to submit anything.) Click here. Data File: eff_wordlist.txt
Read: Section 3.2 from S&W.
November 20: Creating Data Types.
Class Notes: Click here.
Programs from class: Ball, Balls.
Lab#10: Click here. Data file: countries.csv. Due on Friday, December 4. Once done, please send and e-mail to Deepak (as usual).
Read: Section 3.2 from S&W.
- Week 12 (November 24, 27) No classes. Safe travels and Happy Thanksgiving!
- Week 13 (December 1, 4) - Remote
December 1: Objects and Object-Oriented Programming. Several examples.
Class recording: Click here.
Class Notes: Click here.
Program(s) from class: Fraction.
Assignment#7 (Due on Tuesday, December 8 by start of class (from all time zones)): Click here. (Data file is not to be downloaded. See the handout for details)
December 4: Review.
Class Notes: Click here.
Class Recording: Will be posted on Monday, December 7.
- Week 14 (December 8) - Remote
December 8: Exam 3 is today.
Course Policies
Communication
Attendance and active participation are expected in every class. Participation includes asking questions, contributing answers, proposing ideas, and providing constructive comments.
As you will discover, we are proponents of two-way communication and we welcome feedback during the semester about the course. We are available to answer student questions, listen to concerns, and talk about any course-related topic (or otherwise!). Come to office hours! This helps us get to know you. You are welcome to stop by and chat. There are many more exciting topics to talk about that we won't have time to cover in-class.
Although computer science work can be intense and solitary, please stay in touch with us, particularly if you feel stuck on a topic or project and can't figure out how to proceed. Often a quick e-mail, phone call or face-to-face conference can reveal solutions to problems and generate renewed creative and scholarly energy. It is essential that you begin assignments early, since we will be covering a variety of challenging topics in this course.
Grading
There will be 7-10 assignments, weighted equally in the final grading. Assignments must be submitted according to the Assignment Submission instructions.
All graded work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7,
1.3, 1.0, or 0.0. At the end of the semester, final grades will be calculated as a weighted average of all grades according to the following weights:
Eaxm 1: |
15% |
Eaxm 2: |
20% |
Exam 3 |
20% |
Assignments |
25% |
Labs |
10% |
Citizenship/Contribution |
10% |
Incomplete grades will be given only for verifiable medical illness or other such dire circumstances.
Submission and Late Policy
All work must be turned in electronically in your designated Dropbox Folder. We will set up this up in Week#1.
No assignment will be accepted after it is past due.
No past work can be "made up" after it is due.
No regrade requests will be entertained one week after the graded work is returned in class.
Any extensions will be given only in the case of verifiable medical excuses or other such dire circumstances, if requested in advance and supported by your Academic Dean.
Exams
There will be three exams in this course. The exams will be closed-book and closed-notes. The exams will cover material from lectures, homeworks, and assigned readings (including topics not discussed in class).
Study Groups
We encourage you to discuss the material and work together to understand it. Here are our thoughts on collaborating with other students:
- The readings and lecture topics are group work. Please discuss the readings and associated topics with each other. Work together to understand the material. We highly recommend forming a reading group to discuss the material -- we will explore many ideas and it helps to have multiple people working together to understand them.
- It is fine to discuss the topics covered in the homeworks, to discuss approaches to problems, and to sketch out general solutions. However, you MUST write up the homework answers, solutions, and programs individually without sharing specific solutions, mathematical results, program code, etc. If you made any notes or worked out something on a white board with another person while you were discussing the homework, you shouldn't use those notes while writing up your answer.
- Under ABSOLUTELY NO circumstances should you share computer code with another student. Similarly, you are not permitted to use or consult code found on the internet for any of your assignments.
- Exams, of course, must be your own individual work.
If you have any questions as to what types of collaborations are allowed, please feel free to ask.
Created on August 12, 2020.