# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

3 Pages

### cs116_08sLab5Soln

Course: CS 116, Fall 2009
School: Illinois Tech
Rating:

Word Count: 596

#### Document Preview

116 CS SPRING 2008 , SECS. 3-6 LAB #5 ARRAYS SOLUTION Homework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: p. 518: #1, #2, #3 Exercise #1: See coded solution. Exercise #2: See coded solution. Write the pseudocode to solve this problem. Be sure to step through this pseudocode to verify that it will solve the problem. Prompt user for a password Read password from keyboard Check...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Illinois >> Illinois Tech >> CS 116

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #3 SELECTION + DEBUG SOLUTIONHomework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: (1 point) p. 270: #6, 9, 10, 116.if (year % 4 = 0) System.out.print(year + &quot; is a leap year.&quot;); else { year
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #9 POLYMORPHISM Objective 1. 2. 3. 4.To learn to use polymorphism. To learn to read and handle an input file with two input formats. To learn to use an Abstract class. To learn the difference between private and
Illinois Tech - CS - 116
CS 116SPRING 2008 WEEKLY LAB PROBLEM #11 SEARCHING AND SORTING AN ARRAY LIST SOLUTION Ex. #1: See exercises package. Test valuepluShort.txtSearch result before selection sort:found 3016 at: 56 found 3082 at: 28 found 3251 at: -1 found 3161 at: 48
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #2 USER-DEFINED CLASS + APPLICATION Objective: 1. Learn to write java arithmetic expressions. 2. Learn to use explicit casting. 3. Learn to use static methods from the Math API 4. Learn to use precedence of operat
Illinois Tech - CS - 116
CS 116 SPRING 2008, Sec. 3-6 LAB #1 USER-DEFINED CLASS WITH STATIC METHODS SOLUTION Homework: p. 100, #15: (1 point)This program may be corrected in several ways. Here is one correct version: public class LotsOfErrors { public static void main(Stri
Illinois Tech - CS - 116
CS 116SPRING 2007 WEEKLY LAB PROBLEM #8A ID ARRAY LIST Object: To learn how to implement an array list of objects Problem: The philanthropic organization would like to be able to have non-technical personnel manipulate the data stored in the data st
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #8 INHERITANCE, COMPOSITION SOLUTIONExercise #1:Rectangle: length: 4 width: 5 area 20 perimeter: 18 Box: length: 8 width: 6 area 48 perimeter: 28 depth: 4 volume: 192Exercise #2:Length: 8 Width: 6 Width: 12
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #4 ITERATION, FILE I/O SOLUTIONHomework: Programming &amp; Problem Solving with Java,2nd Ed, Dale &amp; Weems: p. 333: #2, 3, 5, 8, 10, 11 Grade #2, 5, 10 1 point apiece2. while ( ! dangerous ) { pressure = datain.nex
Illinois Tech - CS - 116
CS 116SPRING 2008 WEEKLY LAB PROBLEM #11 SEARCHING AND SORTING AN ARRAY LIST Objective: 1. To start coding your final project. 2. To search an array of objects using sequential search. 3. To sort an array of objects using selection sort. 4. To search
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #9 POLYMORPHISM SOLUTION Exercise #1: See ex1_4 Exercise #2: See ex1_4 Exercise #3: See ex1_4. Be sure student have called the correct calcArea() method using polymorphism. Exercise #4: See ex 1_4. Be sure the stu
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #4 ITERATION, FILE I/OObjective: 1. To learn to use iteration to solve a problem. 2. To learn to read and process data from a file. 3. To learn to merge two files. 4. To learn to use nested loops. Homework: Prog
Illinois Tech - CS - 115
Poor:12/40The end product doesn't work at all. They missed key points on the assignment (such as drawing up an API)Also, most of their group did not show up to the second session.Average:30/40The end product has major problems, and some o
Illinois Tech - CS - 115
/* # * cs115 * section3 * homework 2 * 7th September 2007 */package homework2; public class Homework { /* * @param args */ public static void main(String[] args) { / TODO Auto-generated method stub/ System.out.println(&quot;my name is #&quot;); System.out.prin
Illinois Tech - CS - 115
Find a set of instructions for operating an appliance that requires you to set the date and time, such as a DVD player, microwave oven, clock radio, or a computer. Identify the obvious objects in the instructions. Then identify which portions of this
Illinois Tech - CS - 115
08/31/2007 HOMEWORK CS115004*2.Find a set of instructions for operating an appliance that requires you to set the date and time, such as a DVD player, kitchen oven, clock radio, or a computer, identify the obvious objects in the instructions. The
Illinois Tech - CS - 115
/* * # * cs115 sec007 * Lab2 */ package lab2; public class CrissCross { public static void main(String[] args) { char star = '*'; char space = ' '; String string1 = &quot; * String string2 = &quot;* * * * * * * * &quot;; *&quot;;System.out.println(string2); System.out
Illinois Tech - CS - 115
public class JackBanner { /* * @param args */ public static void main(String[] args) { String jack0 = (&quot;Black Jack&quot;); String jack1 = (&quot;#&quot;); char someone = 'j'; String jays = &quot;j j j j j j j&quot;; &quot; &quot; &quot; &quot; System.out.println(jack0+&quot; &quot;+jack0+&quot; &quot;+jack0+&quot; &quot;+ja
Illinois Tech - CS - 115
package Collection; public class cds { private String artiste; private int numCds; / default constructor public cds() { artiste=&quot;Taylor Swift&quot;; numCds=1; } /constructor public cds(String newArtiste, int newNumCds) { artiste = newArtiste; numCds = new
Illinois Tech - CS - 115
No example poor lab for Lab 1 currently exists. None of the students that produced poor labs submitted them to blackboard's digital dropbox.?/15The Homework is poor; it is from the S.Pasari, and is poor because it does not go into detail, or eve
Illinois Tech - CS - 115
The lab is from L. Xu, and it is poor because it completed the spirit of the assignment, while ignoring most of the rules. It had no string of spaces, and each line did not relate to the others. It was more like someone had just started throwing word
Illinois Tech - CS - 331
2 JUNITCS 331 Lab 2: JUnit and Array Lists Spring 20081 IntroductionThe title of this lab is Array List, but is really about JUnit, the testing framework we will be using in this course.1.1ObjectivesYour objective is to become familiar with
Illinois Tech - CS - 331
Linked Lists3 YOUR WORKCS 331 Lab 3: Linked Lists Spring 20081 IntroductionIn this lab you will code some of the basic functions for a singly linked list, and write tests to verify that they work correctly.1.1ObjectivesYour objectives for
Illinois Tech - CS - 331
Stacks and Queues2 GIVEN FILESCS 331 Lab: Stacks and Queues Spring 20081 IntroductionAs we discussed in lecture, stacks and queues are easy to code if you already have a working linked list implementation. In this lab, you will encapsulate a li
Illinois Tech - CS - 331
Binary Search Trees3 GIVEN FILESCS 331 Lab: Binary Search Trees Spring 20081 Objectives Be able to use the find and add traversal patterns. Be able to write delete for the three cases. Have experience using a dictionary style container. Use
Illinois Tech - CS - 331
Iterators1 GIVEN FILESCS 331 Lab 5: Iterators Fall 2007Rev : 4700.1ObjectivesIn this lab you will create two iterators for a singly linked list. Have experience using the Interface feature of Java. Know how to implement a traversal itera
Illinois Tech - CS - 331
Stacks and Queues2 GIVEN FILESCS 331 Lab: Stacks and Queues Fall 2007 Rev : 4691 IntroductionAs we discussed in lecture, stacks and queues are easy to code if you already have a working linked list implementation. In this lab, you will encapsul
Illinois Tech - CS - 331
Binary Search Trees3 GIVEN FILESCS 331 Lab: Binary Search Trees Fall 2007 Rev : 4861 Objectives Be able to use the find and add traversal patterns. Be able to write delete for the three cases. Have experience using a dictionary style containe
Illinois Tech - CS - 331
Iterators3 GIVEN FILESCS 331: Doubly Linked Lists Fall 2007Rev : 4801Objectives Create a doubly linked list. Have more experience using the Interface feature of Java. Use inheritance to enable you to reuse code.In this lab you will crea
Illinois Tech - CS - 331
Linked Lists3 YOUR WORKCS 331 Lab 3: Linked Lists Fall 2007Rev : 4531IntroductionIn this lab you will code some of the basic functions for a singly linked list, and write tests to verify that they work correctly.1.1ObjectivesYour obj
Illinois Tech - CS - 331
Traversals4 YOUR WORKCS 331 Lab: Tree Traversals Fall 2007 Rev : 2301 ObjectivesIn this lab you will create a binary search tree and write some traversal iterators for it. Be able to write iterators for DFS, BFS, Frontier, Preorder, Postorder,
Illinois Tech - CS - 480
CS-480Artificial Intelligence:Planning and ControlShlomo Argamon SB 237C argamon@iit.eduAdministrivia TA: Kenneth Bloom (kbloom1@iit.edu) SB 003B Book: Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, Prentice Hall
Illinois Tech - CS - 445
Principals of Object Orientation OO Analysis Modeling with UML UML Views User model view Structural view Behavioral view Implementation view Environment viewCS585Functional View Static View Dynamic View1/Principals of Object Orientati
Illinois Tech - CS - 445
OO Application FrameworksGUI Chapter 8CS445 Object Oriented Design and ProgrammingClass ScheduleDay Tuesday Thursday Tuesday Thursday Tuesday Thursday Tuesday Thursday Tuesday Thursday Tuesday Thursday Tuesday Thursday Date Topic 31-Oct Fram
Illinois Tech - CS - 487
SoftwareEngineering:APractitionersApproach,6/eChapter8 AnalysisModelingRepresents Requirements in multiple dimensions to uncover errors, inconsistencies and missing informationAnalysisModelingDiagramsScenariobasedDiagrams Usecasediagrams(
Illinois Tech - CS - 440
MP 6 Illinois James and the Castle of DoomCS 440 Spring 2007Revision Rev : 27 Assigned November 28, 2007 Due December 7, 2007 Extension none1 Objectives and BackgroundThe purpose of this MP is to provide the student with some experience in log
Illinois Tech - CS - 487
User Interface DesignChapter 121Interface DesignEasy to learn? Easy to use? Easy to understand?2Interface DesignTypical Design Errors lack of consistency too much memorization no guidance / help no context sensitivity poor response unfri
Illinois Tech - CS - 116
1. (5 points) Understand the basic concepts of inheritance. 1. b) is-a 2. a) Person 3. b) Student 4. e) none of the above, this cannot be determined by examining the code 5. d) public BClass(int a, int b, int c) { super(a, b); z
Illinois Tech - CS - 116
CS 116 SPRING 2008 LAB #12 BIG O NOTATION &amp; COMPLEXITYObjectives: 1. To see how much work is involved in a sequential search 2. To see how much work is involved in a selection sort 3. To see how much work is involved in a binary search 4. To compa
Illinois Tech - CS - 116
CS 116 SPRING 2008, Sec. 3-6 LAB #1 USER-DEFINED CLASS WITH STATIC METHODS Objectives: 1. Use methods of the Java predefined String class. 2. Use static methods. 3. Write a user-defined class and application. 4. Call static methods from the applicat
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #3 SELECTION + DEBUGObjective: 1. To learn to use selection to solve a problem. 2. To learn to translate a table into boolean expressions. 3. To learn to use the debug tool. Homework: Programming &amp; Problem Solvi
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #5 ARRAYSObjective: 1. To learn to assign data to an array and use the data for calculation. 2. To learn to use an array in a user-defined class. 3. To learn to manipulate the data in a user-defined class (deque
Illinois Tech - CS - 116
CS 116 SPRING 2008 , SECS. 3-6 LAB #6 ARRAY OF OBJECTS Objective: 1. To learn to declare and instantiate an array of objects. 2. To learn to initialize the array of objects by reading from a file. 3. To learn to manipulate the data in a user-define
Illinois Tech - CS - 116
1. (5 points) Understand concepts of inheritance.1) Which of the following lists of instance data are accessible in class A2? c) x, z, a, b 2) Which of the following lists of instance data are accessible in A3? d) x, z, a, q3) Which of the fol
Illinois Tech - CS - 116
Shall I compare thee to a summer's day?Thou art more lovely and more temperate:Rough winds do shake the darling buds of May,And summer's lease hath all too short a date;Sometimes too hot the eye of heaven shines,And often is his gold complexion
Illinois Tech - CS - 430
Illinois Institute of Technology Department of Computer ScienceLecture 9: February 18, 2009CS 430 Introduction to Algorithms Spring Semester, 20091Augmenting Balanced TreesFor particular applications, it is useful to modify a standard data s
Illinois Tech - CS - 525
System Architecture1System Architecture (cont.) Division of Labor between Client and ServerClient:1. 2. 3. 4. 5. 6. Presentation/display. Interaction with the user. Application-specific logic. Local caching. Request formulation. Interaction wi
Illinois Tech - SC - 06
PALBeyond Ping-Pong: Application-Centric Measurements of Network PerformanceScott Pakin Performance and Architecture Lab Los Alamos National Laboratory 12 November 2006PALOutlineBackground Motivation Case studies ConclusionsPALPerformanc
Illinois Tech - SC - 06
Optimization of Lattice QCD CalculationsDon Holmgren (djholm@fnal.gov) FermilabInternational Workshop on Performance Analysis and Optimization of High End Computing Systems Supercomputing06, Tampa FL USACollaboratorsInstitutions:Brookhaven Nat
Illinois Tech - SC - 06
The HPC Energy CrisisKirk W. Cameron SCAPE Laboratory Virginia Tech1The Big Picture Problem Power/energy/heat will limit HPC performance Reducing power is a performance problem Challenges for HPC Improve power/energy/heat efficiency Mai
Illinois Tech - SC - 06
Scalable Automated Online Performance Analysis of Applications using Performance PropertiesKarl Frlinger, Michael Gerndt{Karl.Fuerlinger, Michael.Gerndt}@in.tum.deLehrstuhl fr Rechnertechnik und Rechnerorganisation, Institut fr Informatik Techni
Illinois Tech - SC - 06
Scalable Trace-based Performance Analysis of Parallel ApplicationsMarkus Geimer, Felix Wolf, Brian Wylie, Bernd MohrOct 13 2006Outline Introduction Pattern search in event traces Parallel approach Experimental results Conclusion Future wor
Illinois Tech - SC - 06
http:/prophesy.cs.tamu.eduValerie Taylor, taylor@cs.tamu.eduProphesy: Performance Analysis and Prophesy: Performance Analysis and Modeling of Parallel Applications Modeling of Parallel ApplicationsValerie TaylorXingfu Wu, Charles Lively, Sameh
Illinois Tech - SC - 06
Remove the Memory Wall: From performance modeling to architecture optimizationXian-He Sun Scalable Computing Software LaboratoryIllinois Institute of Technology sun@iit.eduNov. 12, 2006SC06Scalable Computing Software (SCS) Lab.Distributed Op
Illinois Tech - SC - 06
Performance Challenges for LargeScale Computational Science and Engineering Douglass PostChief Scientist DoD High Performance Computing Modernization Program (IPA from CMU Software Engineering Institute) http:/www.hpcmo.hpc.milThe International Wo
Illinois Tech - SC - 06
APART WorkshopInformation Sciences Institute, Computational Sciences Division12 November 2006 Bob Lucas rflucas@isi.eduThe Performance ChallengeFigure courtesy Roger Logan, LLNLHow I Wasted SummerBreadth-first Multifrontal Method on Origin
Illinois Tech - SC - 06
SC06 International Workshop on Performance Analysis and Optimization of High-End Computing SystemsApplication Accelerators: Deus ex machina?Jeffrey S. Vetter1,2, Sadaf Alam1, Nikhil Bhatia1, Jeremy Meredith1, Philip Roth112Future Technologi
Illinois Tech - SC - 06
APART PANEL A Performance Tools Strategy for Petascale SystemsChair: Allen D. Malony University of OregonSchedule10:30-10:35 Panel introduction 10:40-11:35 Panelist position statements12 minutes each Save questions for audience Q&amp;A11:35-11:45
Illinois Tech - SC - 06
SC06 7th Intl. APART WorkshopHigh-End Grids and Tools IssuesA Performance Tools Strategy for Petascale SystemsDieter Kranzlmller GUP, Joh. Kepler Univ. LinzSC06 7th Intl. APART WorkshopGrids today, e.g. EGEESC06 7th Intl. APART Workshop
Illinois Tech - SC - 06
Six Extreme Scale Tool Myths Bronis R. de Supinski Project Leader Code Development &amp; Performance Environment for Scalable Systems Center for Applied Scientific Computing Lawrence Livermore National LaboratoryKeys to a Good Panel Experts Controve
Illinois Tech - CS - 588
CS 588 PIP Comments - Program 4A Spring 2002 The format of this PIP compilation is as follows: PIP id number. Statement of Process Problem Change Proposal 1. I had two functions in my code that in effect performed just about the same calculation. Thi
Illinois Tech - CS - 589
1 CS 589 EXAM DATE: DEC 5,2002, TIME: 10:00- 11:15 Final Exam Review The final exam will be closed book, closed notes. The exam will take up one class period - one hour and fifteen minutes. IF YOU ARE UNSURE OF THE SITE YOU NEED TO BE AT TO TAKE THE