






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







06/1/09 – Welcome to our CSE1301 class – I’M EXCITED TO BE YOUR HELPER AND PARTNER IN EDUCATION THIS SEMESTER. I HOPE YOU ENJOY THE CLASS AND LEARN LOTS ABOUT PROGRAMMING AND PROBLEM SOLVING. Read the following, currently, dated announcements. The others will be important (and will be dated) when we cover the material in class. 06/1/09 – All programming assignments must include the following documentation on the source code: // Program Name: Test.java // Course: CSE1301 M-W DAY // Student Name: John Doe // Assignment Number: Project# or Lab# // Due Date: June 1, 2009 // Signature: (for Projects only)____________________________ // (The signature means that the program is your own work) // 2-3 sentences about the purpose of the program (Don’t forget this part!) For Closed Lab Assignments, add the following line to the end of your source program: System.out.println(“Coded by __________ ” ); //enter your name here 06/1/09 – Most of the code and instructions for lab assignments is available at the publisher’s website (www.aw.com/cssupport) (UNLESS OTHERWISE NOTED) along with instructions at the class web site. You do not have to type in the whole program – just add the necessary code. Do not forget to logout! Come to closed lab prepared to finish the assignment in 1-2 hours. 06/1/09 – Homework#1 was assigned in the first class. Check the syllabus for the assignment. It is due on Monday, June 8. Your homework grade is 10 points on the final grade – do not forget to do homework assignments! 06/1/09 – The answer to question 21 on Homework#1 is 128. Question is confusing – sorry. 06/1/09 – Information provided by a student for reaching the CS server from home (let me know if you have any trouble with these instructions) :
06/3/09 - Project 1 has been posted on the website. It will be due on Monday June , 2009 (Feb 5 for T-R class). Remember that, for projects, all classes must have a documentation block preceding the class that explains briefly what the program does. See Lab 1. This documentation is given above. All projects must be submitted in a folder with the assignment page, the algorithm, the source (properly documented) and the required outputs. 06/3/09 – I can’t emphasize enough that you must read and partially prepare the lab assignments before you come to lab. You only have 110 minutes to complete the assignment. The lab assignments are posted on the class website. 6/15/09 – Remember that project numeric grades are 95 for an A, 85 for a B, etc. If every requirement is met, the output is correct, and the project is on time, you will receive an A, which is 95. Extra credit points may bring a project grade to 100, 105, or more. 06/15/09 – Project#2 has been posted on the class web site – it will be due on Wednesday, June 24. For extra credit on Project#2, you can code and run the Millionaire Program (We covered this problem in class today). Input the data and run three separate times - once with an amount of $10,000.00 and rate of 0.08. You may choose the other two data sets. The increment/decrement exercise is an additional extra credit on Project 2. (See the instructor for the handout.) 06/15/09 – Help with coding standards from David Hood, a former lab assistant
x[position] = key; } } 07/06/09 – Bubble Sort (which exits early if array becomes sorted) public static void bubbleSort (int[] x) { boolean sorted; int temp; int numpairs = x.length-1; do { sorted = true; for (int i = 0; i < numpairs; ++i) if (x[i] > x[i+1]) { temp = x[i]; x[i] = x[i+1]; x[i+1] = temp; sorted = false; } numpairs--; } while (sorted == false); } 07/06/09 – The code for a sequential search is as follows: public static int seqSearch (int [] list, int target) { for (int i = 0; i < list.length; ++i) if (list[i] == target) return i; return -1; } 07/06/09 – The code for a binary search is as follows: (array must be sorted in ascending sequence for this code to work – you can adjust it to search an array in descending sequence) public static int binSearch (int[] list, int target) { int first = 0; int last = list.length-1; while (first <= last) { int mid = (first + last)/2; if (list[mid] == target) return mid; else if ( list[mid] > target) last = mid – 1; else first = mid + 1; } return -1; } 07/07/09 - Project #5 has been posted to the class web site. Project#5 will be due on Wednesday, July 22, 2009. 7/13/09 – We will take quiz 3 on July 27th^ in room J251. A workshop has been scheduled for our regular classroom for that week so we will just use the lab.
7/14/09 – Schedule for the last two weeks of class Wed Jul 15 – finish arrays and ArrayList, a provided class Go over some graphics and assign teams, pick a topic Mon Jul 20 – Review for Quiz 3 and work on graphics in class and lab Wed Jul 22 – team presentations (Project 6), Project 5 due also Mon Jul 27 – Quiz 3 in room J251 – our regular classroom is being used for a workshop 7/14/09 – On July 22, students will be presenting GUI and graphic programs in class. Each student may choose a teammate for this assignment. Each student, or student team, will present and explain one of the graphic labs at the end of Chapters 2-7 in the Lab Book (at www.aw.com/cssupport web site) or a graphics program of your own design in a 5 minute presentation. This presentation will be graded as Project 6. In your presentation: *introduce yourselves *tell us what you are going to do *run the program to show what it does *explain the significant code in the source program *comment on anything new or interesting you learned from this exercise *hand in a short paragraph explaining your program, signed by both students if it is a team presentation, the source, and screen shot(s) of the output(s). TEXT/LAB DATE PRESENTATION(Chapters refer to electronic lab book) NAMES(MW DAY) Lab 7/22 Drawing a Face, Chapter 2 Lab Creating a Pie Chart, Chapter 2 Lab Colors in Java, Chapter 2 Lab Nested Panels, Chapter 3. Lab Calculating Body Mass, Chapter 4 Text book Explain Balloon, 253- Lab Vote Counter, Revisited, Chapter 5 Lab Pay Check Program using dialog boxes, Chapter 5 Lab Own Design Lab Own Design Text book Explain Animation of While Loop, 299- Lab A Rainbow Program, Chapter 5 Lab Modifying EvenOdd, Chapter 5 Lab Adding Buttons to StyleOptions, Chapter 5. Lab Telephone Keypad, Chapter 6 Lab Polygon Person, Chapter 7 Lab An Array of Radio Buttons, Chapter 7 Lab Drawing Circles with Mouse Clicks, Chapter 7 Lab Moving Circles with the Mouse, Chapter 7 Lab Moving a Stick Figure, Chapter 7 Text book Tortoise and Hare Race, page 683 Text book Explain Draw A Die, page 258- 7/20/09 – EVERYONE: Please bring Homework 2 to class on Wednesday – I need to convert the grade you got to a value based on 100% for my records. 7/20/09 – Project 6 has been posted on the Projects website. Be sure to download it as the first page of your folder for Project 6 – one folder per team. The folder must include the assignment sheet, the source code, snapshots of the output, and a brief
4/1/09 –On April 20 and 22 (April 21 and 23 for T-R class), students will be presenting GUI and graphic programs in class. Each student may choose a teammate for this assignment. Each student, or student team, will present and explain one of the graphic labs at the end of Chapters 2-7 in the Lab Book (at www.aw.com/cssupport web site) or a graphics program of your own design in a 5 minute presentation. In your presentation: *introduce yourselves *tell us what you are going to do *run the program to show what it does *explain the significant code in the source program *comment on anything new or interesting you learned from this exercise *hand in a short paragraph explaining your program, signed by both students if it is a team presentation, the source, and screen shot(s) of the output(s). 4/1/09 - submit your choice from the list below (or a graphics program of your own design) with the names of the team members by class on Wednesday, April 8 (April 9 for T-R class). You can email me this information or print it on a piece of paper. If you do not choose a topic, one will be assigned to you
TEXT/LAB DATE PRESENTATION(Chapters refer to electronic lab book) NAMES(MW DAY) Lab 4/20 Drawing a Face, Chapter 2 Moiz & Shaf Lab 4/20 Creating a Pie Chart, Chapter 2 Sean Manley Lab 4/20 Colors in Java, Chapter 2 Anchi Cheng Lab 4/20 Nested Panels, Chapter 3 .Anthony T & David C. Lab 4/20 Calculating Body Mass, Chapter 4 Blake & AJ Text book 4/20 Explain Balloon, 253-256 CULPEPPER Lab 4/20 Vote Counter, Revisited, Chapter 5 SCOTT CODY Lab 4/20 Pay Check Program using dialog boxes, Chapter 5 Frankie & John Gibson Lab 4/20 Own Design Lab 4/20 Own Design Robert Payne Lab 4/20 Own Design MAYA & PERRYMAN Lab 4/20 Own Design WILLIAMS Text book 4/22 Explain Animation of While Loop, 299-306 GUELEV & HUFFMAN Lab 4/22 A Rainbow Program, Chapter 5 Tiffany Nasert Lab 4/22 Modifying EvenOdd, Chapter 5 D. Valme Lab 4/22 Adding Buttons to StyleOptions, Chapter 5. Kernan & Bolduc Lab 4/22 Telephone Keypad, Chapter 6 Mai & Santos Lab 4/22 Polygon Person, Chapter 7 Michael Ball Lab 4/22 An Array of Radio Buttons, Chapter 7 Asher & Dominic Lab 4/22 Drawing Circles with Mouse Clicks, Chapter 7 Yemi Bakre Lab 4/22 Moving Circles with the Mouse, Chapter 7 Kingsley Otaluka Lab 4/22 Moving a Stick Figure, Chapter 7 Cagle & Brian S. Text book 4/22 Tortoise and Hare Race, page 683 Hunt & Wilkins Lab 4/22 Own Design Harris & Harison Text book 4/22 Explain Draw A Die, page 258-260 Mitchell D. Lab 4/22 Own Design Brian Ellison TEXT/LAB DATE PRESENTATION(Chapters refer to electronic lab book) NAMES(TR NIGHT) Lab 4/21 Drawing a Face, Chapter 2 BRYANT
Lab 4/21 Creating a Pie Chart, Chapter 2 Atlas & Selph Lab 4/21 Colors in Java, Chapter 2 Aylor & Bell Lab 4/21 Nested Panels, Chapter 3 COMPTON Lab 4/21 Calculating Body Mass, Chapter 4 Johnson & Bannis Text book 4/21 Explain Balloon, 253-256 Diego Morales Lab 4/21 Vote Counter, Revisited, Chapter 5 Bahr & Ethan Smith Lab 4/21 Own Design Text book 4/23 Explain Animation of While Loop, 299-306 UKO & VU Lab 4/23 A Rainbow Program, Chapter 5 Ethan Green Lab 4/23 Modifying EvenOdd, Chapter 5 S.JOHNSON & KINGSLEY Lab 4/23 Pay Check Program using dialog boxes, Chapter 5 Echols & Nzube Lab 4/23 Adding Buttons to StyleOptions, Chapter 5. LANKFORD & ZAN LI Lab 4/23 Telephone Keypad, Chapter 6 Harris & Chelsea.Smith Lab 4/23 Polygon Person, Chapter 7 Ivan & Nathan Smith Lab 4/23 An Array of Radio Buttons, Chapter 7 RICHARDS & ROBERTS Lab 4/23 Drawing Circles with Mouse Clicks, Chapter 7 Giles & Emmanel? Lab 4/23 Moving Circles with the Mouse, Chapter 7 SEO & CHUNG Lab 4/23 Moving a Stick Figure, Chapter 7 Matthew LaCroix Lab 4/23 Own Design DOUG SMITH Text book 4/23 Explain animation of single or double array BOWLER Text book 4/23 Tortoise and Hare Race, page 683 Fuller & Rambin Lab 4/23 Own Design WANG & ZHANG Text book 4/23 Explain Draw A Die, page 258-260 David Sayle 4/1/09 – The presentations will be graded on: your enthusiasm the amount of information provided the clarity of the information in your presentation whether or not you followed the instructions given above Student presentations will be graded as Project#6. 4/1/09 - A completed folder is required for Project 6 – it may be turned in on the day of presentation or by April 29 (April 30 for T-R class), the last day of class. Project 6 is now posted on the class web site. 4/6/09 – Remember to sign up for a graphics presentation by Wednesday, April 8 (Thursday, April 9 for T-R class) or one will be assigned to you. See list above for available topics. You can send me an email or give me a note in class – first come, first served with the choices left. 04/14/09 – Please find your name on the graphics schedule above. Many of you signed up on your own and tonight I assigned the rest of the class to a topic. If I have made a mistake or an omission, please see or email me ASAP. 4/14/09 Project#6 has been posted to the class web site. Project 6 is basically your presentation but a folder summarizing the project is required. It is due on the day of presentation or April 29, 2009 (April 30 for T-R class) - last day of class.
for (int i = 0; i < table.length; ++i) for (int j = 0; j < table[0].length; ++j) table[i][j] =(int) (Math.random() * 100 + 1); 8.) public static int sumOdd (int [][] a) { int sum = 0; for (int i = 0; i < a.length; ++i) for (int j = 0; j < a[0].length; ++j) if (a[i][j] % 2 1= 0) sum += a[i][j]; return sum; } 11/7/06 – For Lab#9, you will need the following code: (We did not do this in lab - spring, 2008) public void removeFirst(int newVal) { for (int i = 0; i < numElements; ++i) { if (list[i] == newVal) { for (int j = i; j < numElements-1; j++) list[j] = list[j+1]; numElements--; return; } } } In the method removeAll , just change return; to i--;