Introduction to Programming II

Computer Science 162 - Fall 2011 - Dr. Hutchens
Tuesdays (Roddy 147) and Thursdays (Roddy 136) 8:00 AM - 9:50 AM and 1:00 PM - 2:50 PM
(sometimes in the Linux Lab)

Instructor

Prerequisite
You are expected to have a C or better in CS 161 before taking this course.

Required Textbook
Data Structures and Other Objects using Java (third edition), Michael Main, Addison Wesley, 2006, ISBN 0-321-37525-4. It has a green cover. The second edition and C++ editions are not appropriate.

Goals
Our main goals this term are to further develop your problem solving and software engineering skills (particularly encapsulation), to explore and implement some classic data structures, and to examine various classic algorithms for solving particular types of problems. You will be asked to write many programs. These assignments are a very important part of the course. The assignments build on each other and reinforce concepts from lecture. Don't fall behind on the reading or programming assignments.

Grading
Test 1 = 25%
Test 2 = 25%
Final exam = 25%
Assignments = 25% (earned points / total points available points of projects; assignments will have varying point values)

I use a ten-point grading scale (93 = A; 90 = A-; 87 = B+; 83 = B; ...). Tests and exams will be closed book and must be your own work. You must complete the many programming and laboratory assignments either by yourself or with your partner in pair programming. Any other collaborating is cheating.

Refer to the pair programming guidelines. On some assignments, I may require that you work alone without your partner.

Attendance
I expect you to attend class, read the text as noted, and keep up with the assignments. Please be prompt. Getting notes from a friend is not sufficient. My tests emphasize what we have covered in class. Missing class reduces your understanding of the material and will make passing the course more difficult. Missing the hands-on lab experiences will make the assignments substantially more difficult. Come to class prepared to learn.

Academic Honesty
You may ask me questions at any time. Copying or collaboration with anyone else on tests is not permitted and may result in failure in the course. Working with anyone other than your pair programming partner is also cheating. Refer to the university policy on academic honesty for details and penalties.

This is an introductory and core course in your major. If you are finding that you need to cheat to get through the material and assignments, please reconsider why you are in the course.

You may discuss approaches to solving the problem as long as the discussion remains above the level of specific Java instructions. This rule may be tightened on some assignments. You may also seek aid in resolving compiler messages. However, if someone else is typing on your keyboard or you are copying code off someone else's screen or from their email or web page, you are getting too much help. If you can't explain why you did something, you probably didn't do it yourself. Finding or purchasing a solution on the internet or elsewhere and turning that in as your own work is also plagarism and may result in failure in the course. If you do have reason to use code from the book or another source, include attribution in a comment in your program. When in doubt, ask me.

In defense of your work, change your password frequently, be sure your course files are not readable (including on your machine at home or dorm room), don't leave paper listings lying around, and log off when leaving the lab. Conceal your paper when taking tests. Be careful when helping other students.

Tests
Tests will be in the classroom. They will be cumulative with closed book, notes, and neighbor. The only allowed tools are pen or pencil, blank paper, and your brain. If you miss a test, you will receive a grade of zero for that test. Exceptions may be made at my discretion for reasons of illness or university excused absences. Contact me immediately, preferably before the exam, if you have a problem.

Programs - Early, Late, and Faulty
There are no late programs. A program must be delivered by the time and date specified for the assignment to my hutchens162 account. If your program is not complete, submit what you have for partial credit. Develop your programs incrementally, and you will always have something to turn in for partial credit. I do give partial credit, and some points are better than zero points.

Each assignment will note how many points it is worth. Some assignments are worth more than others, but you should attempt all of them. The number of points you accumulate on assignments will be summed and that total will be divided by the total points available.

All programs must compile properly using Java in Eclipse on the MU CS department's Linux computers without compiler errors. Programs that do not compile have a maximum grade of 25% of the assignment's points.

A program that compiles cleanly is not necessarily correct. I will deduct points for missing, incomplete, and incorrect features. Be sure your program meets the problem specification. Read your programs for errors and test them with several suitable test sets. Note that I am extremely good at breaking programs. You should try to break your program before I do.

I also read your programs. I will deduct points for poorly indented and commented programs as well as those that use poor programming practices or do not use the techniques and data structures specified in the assignment. 'A' does not mean adequate. Refer to example programs from class as models.

Contacting Me
If you have a question, don't wait to get help. Ask questions in class. Work the example problems and warm-up exercises. This is a cumulative subject, and it doesn't get easier. Practice helps.

Ideally you will ask me questions in person. I have office hours as noted above and by appointment.

I am also accessible through email. I check my mail several times a day. If you have a question about your program, submit the source code as if you are turning it in and then send me email asking your question and letting me know you submitted the program. If a question or answer pertains to many people, I will send a general answer to the entire class by email.

Expectations
This is a 100-level course, but it is definitely not easy. It is substantially more difficult than CS 161. Becoming a good computer scientist takes practice. I expect you to attend class regularly, read the text, do the warm-up exercises, and participate in class. Written class notes copied from a classmate do not capture the process of developing the problem solutions. Don't fall behind on the programming assignments. This is a cumulative course in a technical subject that has its own vocabulary. Pay attention, schedule enough time, and get help early.

On some (not all) Tuesdays we will meet in the Linux lab for hands-on practice. I will give you the handout describing the lab activity at a class before the lab. I expect you to read through it before you come to lab and sometimes do some pre-work to get ready for lab. This will make the lab period much less stressful. You are expected to remain in the lab for the full lab period or until you have successfully completed all work. Most assignments will require further work outside the lab period. Expect to spend considerable time on the programming assignments outside class.

This is a computer science course. I expect you to be comfortable using the web, email, and Eclipse. I expect you to check your email on cs regularly and at least once a day. Examples, answers to questions other students have asked or problems I've seen, and other helpful information will be available through email, files in my examples folder, or on the course web page. Take advantage of these resources.

Submitting and Grading Assignments
You will turn in all labs and assignments using an automated assignment management system. Be logged into the Linux system and using a terminal. Eclipse will have stored each project in a separate directory. Move to the directory where the source files for this project are stored. Use an ls command to see that your Java source code files end in .java. For some assignments, some of your source code may be in subdirectories. Use the submit command, choose hutchens162 (my account for grading), and then choose the assignment name. Your project files are copied to the appropriate place in my hutchens162 files with your account name noted. If you decide you have a better version and the due date hasn't passed, you may submit again. The old version in my files is renamed, and the file you indicate is copied to my file space. Unless there is a problem, I do not look at these older versions. There is no penalty for submitting a reasonable number of versions. You may use the submitlog command to check what you have submitted and when.

When I grade the assignment, your most recently submitted project source code runs through the compiler. The executable programs are run with several sets of test data, and the results are recorded. I do not necessarily type in data to each program each time I grade an assignment although I will do some interaction with graphical versions. It is your responsibility to make sure that your program reads the data in the correct order and format. Don't expect extra input. Don't change the input requirements to suit your program. Unless otherwise specified in the assignment, all data should be read from standard input just as if it had been typed at the keyboard.

I personally read and evaluate your final submission for each assignment. I check whether it gives the correct answers for each of several test sets. Does it print the output in the correct format? What happens when your data structure is empty, when elements are added to or deleted from the beginning, end, or middle, or when it is full? Does it use the programming concepts we're studying? Did you pass parameters appropriately? I examine the program's style including comments and indentation. Do the functions each do one thing well? Just getting the correct answers is not enough to earn full credit.

I also notice unusual ways of approaching problems, spelling mistakes, and similarities between programs. I am very annoyed when I spend time grading a program and run across it a second time when grading a program submitted by another student. Don't copy another student's program; it's cheating.

I record comments about your program as I read it. My comments state how many points I am counting off and why. For example
   (-10) Your total variable is not initialized to zero.
All my comments to you are gathered into an email message containing your grade for the assignment. The email is sent to your account on cs.

Using Available Resources
Read the textbook. But read it not as a novel or something to be memorized. Read it in small doses when you can concentrate. Work the Self-Test Exercises. There are solutions at the end of each chapter. Skim chapters before we cover them in class. Read sections again after we have talked about them in class.

The course web page at http://cs.millersville.edu/~hutchens/cs162/ has information about the course. The examples developed in class are in /home/grader/hutchens162/examples on cs. The textbook programs are on the authors' web site; there's a link on the course page.

Have Fun
I love being a computer scientist. I can create something out of my imagination and share it with others. Programs are often like puzzles. This is fun stuff, and I hope you'll enjoy it. If an assignment doesn't seem fun, try to think of it as a puzzle. Put together the frame and then work on small parts.