Central Connecticut State University Summer, 1st 5, 1999 CS 290 - Java 2 Credits Section 50 MTWR 07:45-09:45 PM Room 208 Maria Sanford Hall June 10 until July 1, 1999 Note: Due to the State shutdown on Tuesday, June 8, the starting day will be postponed by one class day to Monday, June 14, 1999. There will be a makeup class session scheduled later, after discussion with you. This will give us 13 class days, which is works out to 2/3 of the 5 week session plus one extra day. Instructor: Dr. Charles W. Neville Course Description: The department is shifting to Java. This course will prepare students who have had CS 151 and/or CS 152 in Pascal for more advanced courses taught in Java. CS 290 is a 2 credit hour course, and will meet for 13 class sessions from June 4 until June 25. Required Text: Java Software Solutions, Foundations of Program Design, by Lewis and Loftus., Addison Wesley, 1998. Optional Texts: Any of the books listed on the Java Resources Page (see below), Bradley Kjell's complete Java CS I course on the Web, and/or The Java Tutorial, by Mary Campione and Kathy Walrath, described below. All of these are available from the Java Resourses page. CS 290 -- Java Course Web Page: The CS 290 -- Java Home Page is available immediately off of my Web page. My Web page URL (Web address) is http://www.cs.ccsu.ctstateu.edu/~neville. (No period at the end of the URL.) Java Resources Web Page: The Java Resources Page is available immediately off my main Web page and the CS 290 -- Java Web page. The Java Resources page includes an extensive list of Java Resources, including lists of good Java books, Java demos and tutorials, Bradley Kjell's complete Java CS I course on the Web, a complete Java book, "The Java Tutorial", by Mary Campione and Kathy Walrath, available FOR FREE on the Web from SUN Microsystems, and a FREE copy of Sun Microsystems Java Development Kit and documentation. The student will need at least three 3.5" HD floppy disks, and two or three folders with pockets in which to hand in lab assignments. Prerequisite: CS 151, CS I. You MUST be familiar with another programming language, with functions and procedures, with arrays and records (structures in C) and with structured programming. Course Objectives: Upon successful completion of this course, the student will: 1. Understand the basic structure of Java programs. 2. Understand and use the basic Java control structures, such as if ... else, switch, while, do, for, and break. 3. Define classes and use objects. 4. Pass messages to objects and write methods. 5. Understand and use the basic Java data types. 6. Understand and use arrays. 7. Write applets and applications. 8. Draw on graphics objects. 9. Understand and use inheritance. 10. Understand and use abstract classes and interfaces. 11. Understand text fields, labels, buttons, lists, menus, and other GUI objects from the Java Abstract Window Toolkit. Computer Resources: We shall use Java version 1.1 and/or version 1.2. Directions for using Java in the University Microcomputer Laboratory and/or in the Computer and Information Sciences and Technology Laboratory in room 208 Maria Sanford are available under CS 151 on my Web page (see below). The Java Development Kit is available FOR FREE from SUN Microsystems, and there is a link on my Java Resources page. Assignments and Exams: Reading and project assignments are listed below. Exam dates are denoted by **. Make-up exams are scheduled by appointment only. Project 1 is due Thursday, June 17. Project 2 is due on or before Thursday, June 24. Project 3 is due on or before Monday, June 28 (the beginning of the last week of the course). Project 4 is due on or before Thursday, July 1. Mini-assignments should be done, but do not need to be handed in. Grading: Your final grade will be based on computer projects and in-class exams, and will be affected by classroom participation, conduct and attendance. The exams will include questions from the textbook and computer project assignments. The numerical grades for the exams will be averaged and then converted to a letter grade. Attendance: One unexcused absence is allowed, and any work missed must be made up. The student should notify the instructor concerning absences, or there will be a grade penalty. Student Conduct. It is expected that all students will conduct themselves in a respectful manner, and will assist in maintaining an atmosphere conducive to learning in the classroom. Honesty Policy. It is expected that all students will conduct themselves in an honorable and honest manner. It is alright to give and receive help on projects, but no student may claim another's work as his or her own, and no student may have another student's program in his or her possession. Students may use code from published sources, but if a student uses code from a source other than class or the text, the student should provide a reference in comments. Office Hours: Before and after class. Feel free to stay for help, and feel free to stay to chat. My office is in room 205 Maria Sanford Hall. In an emergency, email me at neville@ccsu.edu, (no comma at the end of the email address) or call me at 832-2719 (work). My Web page URL (Web address) is http://www.cs.ccsu.ctstateu.edu/~neville. (Again, no period at the end of the URL.) Note: The University has completely broken my email during the changeover to the Microsoft Monopoly Software Outlook email system. I will inform the class when email works again. Week No. Reading and Project Assignments 1. 6/10 Chapter 2, Software Concepts Mini-assignment:Do Exercise 2.20, p. 78: Write an applet that prints Knowledge is Power inside an oval. Enter, compile and run your applet. Mini-assignment: Do Exercise 2.21, p 78: A mad-lib is a sentence with certain words left out. Using the mad-lib in the text, write a program that accepts three words as command-line arguments and prints the completed sentence. Follow the remaining directions in the text. 2. 6/14 Chapter 3, Program Elements Mini-assignment: Do Exercise 3.16, p. 118. Write a program that reads an integer value and prints the sum of the integers between 2 and the input value, inclusive. Print an error message if the input value is less than 2. Prompt accordingly. Mini-assignment: Modify the previous mini-assignment to accept its input from a command line argument. Project 1: Do project 1 from the Spring 1999 session of CS 151. In addition to the demos mentioned as relevant in the project description, you will find demos 8, 9, and 10, the demos relating to Sally's lemonade stand, of use. The CS 151 project descriptions are available on the CS 290 -- Java Home Page. Chapter 5, More Programming Constructs 3. 6/21** Test 1 Chapter 6, Objects for Organizing Data Project 2: Do project 3 from the Spring 1999 session of CS 151, but, contrary to the directions in the project description, do TWO parts, an Applet and a GUI Application.. The project concerns simulating a chance experiment of rolling two dice 1000 times, and tabulating the outcomes. Project 3: Do project 4 from the Spring 1999 session of CS 151. The project concerns coding and decoding messages using Caesarian codes. Chapter 4, Objects and Classes 4. 6/28 Mini-assignment: Write a simple word processor. This takes ALMOST NO CODE if you use the TextArea class appropriately. Find out about it from Sun's Web site at the URL given on the Java Resources page. Test your word processor by entering several paragraphs of text, selecting text and copying it to the clipboard using CTRL C (on a Windows 98 machine) and pasting it into Notepad using Notepad's Edit menu. You do not have to include a File Save feature. Chapter 7, Graphics Project 4: Do project 5 from the Spring 1999 session of CS 151. The project concerns drawing something interesting on an Applet Panel. HAVE FUN! 7/1** Final Exam Have a Good Summer!