13 Pages

06-feb04

Course: COMP 110, Spring 2008
School: UNC
Rating:
 
 
 
 
 

Word Count: 316

Document Preview

If/ElseandCaseStatements TabithaPeckM.S. COMP110 February4,2008 MWF33:50pm Philips367 1 Announcements NewHomeworkPolicy Grades Incorrectsubmissions==losealettergrade Threeincorrectsubmissions==zerocredit Check.jarfilesBEFOREyousendthem Seemeifyouarestillhavingproblems Lab1,Lab2,Project1 PostingGradesonline? Handingbackgrades? 2 Questions? FromLab2 Norealproblems Nevergotthesameproblemtwice 3...

Register Now

Unformatted Document Excerpt

Coursehero >> North Carolina >> UNC >> COMP 110

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.
If/ElseandCaseStatements TabithaPeckM.S. COMP110 February4,2008 MWF33:50pm Philips367 1 Announcements NewHomeworkPolicy Grades Incorrectsubmissions==losealettergrade Threeincorrectsubmissions==zerocredit Check.jarfilesBEFOREyousendthem Seemeifyouarestillhavingproblems Lab1,Lab2,Project1 PostingGradesonline? Handingbackgrades? 2 Questions? FromLab2 Norealproblems Nevergotthesameproblemtwice 3 Gotcha== var1=var2(assignmentstatement) var1==var2(booleanexpression) DoNOTuse==tocompareStrings Error!!!!!!! string1==string2//BAD string1.equals(string2);//GOOD 4 Gotcha(Syntax) if(booleanexpression); DO NOT DO THIS!!!!!!! TodayinCOMP110 Moreif/elsestatements Casestatements 6 Tracingif/elsecode I give you code and input You give me output 7 Example input = 5? input = 6? int days = 0; if (input < 6) System.out.print(I worked + input + days this week); else { days = 6 input + 1; System.out.print(I worked + + days days of overtime); } 8 AnotherExample Writetheif/elsepartofaprogramthat determinesifapersonisoldenoughto votebasedontheirage.Ifthepersonis oldenoughtovote,askiftheyarevoting inthedemocratorrepublicanprimary, andtheniftheyarevotingforObamaor Clinton,orMcCainorRomney. 9 SwitchStatements switch (numOfSiblings) Controlling expression { integer or char ONLY! case 0: System.out.print(An only child); break; case 1: Case System.out.print(Just one you say); break; Break label statement case 2: System.out.print(Two siblings!); break; case 3: System.out.print(Big family!); break; default: System.out.print(I dont believe you); break; } 10 PracticewithSwitchstatements Writeaswitchstatementthattakesas controllingexpressionyouryearincollege (asinint)andoutputsyouryearincollege asfreshman,sophomore,junior,senior, orsupersenior Shorthandforif/else if(n1>n2) else max=n1; max=n2; max=(n1>n2)?n1:n2; 12 Wednesday Read3.2 LoopStatements 13
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:

UNC - COMP - 110
COMP110 SwitchStatementsandLoopsTabithaPeckM.S. February6,2008MWF33:50pm Philips367 1AnnouncementsFridayNoLab!BringquestionsonProject2Gradesonlinenextweek2Questions?3SwitchStatementsswitch (numOfSiblings) Controlling
Georgia Tech - EAS - 6132
4.Radiative FluxesThe net radiation at the surface is Sv + S g Lv + Lg , where S is the net solar flux absorbed by the vegetation (v) and the ground (g) and L is the net longwave flux (positive toward the atmosphere) (W m-2).()()4.1Sol
Georgia Tech - EAS - 6140
EAS6140Thermodynamics Worksheet7Combined1stand2ndLaw 14. Write the first and second law combined in enthalpy form (intensive) dh Td vdp15. The Gibbs energy is defined as g = u - Tpv WriteanexpressionfortheGibbsenergyindifferentialform dg du ( d
Georgia Tech - EAS - 6140
EAS6140ThermodynamicsoftheEarthSystem Fall2007PracticeExam1Units(youarentexpectedtohavememorizedthese,butyoushouldeasilybeableto figurethemoutbasedupondimensionalanalysisofequationsthatyouhavememorized orareonthesheetofequations. 1. Specifcgasconst
UNC - COMP - 110
COMP110 LoopsTabithaPeckM.S. February11,2008MWF33:50pm Philips3671AnnouncementsOfficehours THISWEEKONLY! Monday4:005:00 Tuesday1:302:30inSitterson252!Program2DueWednesdayby3:00 Gradesonline2Questions?3TodayinCOMP110Loops
Georgia Tech - EAS - 6140
EAS6140ThermodynamicsofAtmosphereandOcean Fall2007EXAMII Aparcelofairconsistingofdryair,watervapor,andcondensedliquidwaterissinking, undergoingtoreversiblesaturatedadiabaticcompression.Theairparcelisaclosed thermodynamicsystem(i.e.nomassentersorleave
UNC - COMP - 110
COMP110 MoreLoopsandStringsTabithaPeckM.S. February18,2008MWF33:50pm Philips367 1Announcements Programs STARTEARLY! Gethelpifyouarestumped ReadInstructions Shouldtake1015hours ShouldNOTtake20+hours Officehoursarehelpful2Announc
UNC - COMP - 110
COMP110 ClassesTabithaPeckM.S. February20,2008MWF33:50pm Philips367 1AnnouncementsLab4DueFriday OfficeHoursTodayafterClass Helpwithloops HelpwithLab4JasonJerald2ParticipantsNeededforVirtualReality MotionPerceptioninVirtualE
Georgia Tech - EAS - 6140
EAS6140ThermodynamicsofAtmospheresandOceans Solutions 1.Circlethefollowingthataretruestatementsaboutsolutions a)asolutionconsistsonlyofasinglephase b)asolutionmusthavemorethanonecomponent c)solutionsmustbeliquid. 2.Thecomponentinthesolutionwiththelar
UNC - COMP - 110
COMP110 InformationHidingand EncapsulationTabithaPeckM.S. February25,2008MWF33:50pm Philips3671AnnouncementsLatedaysDoyouhaveanyleft?2Questions?Whatisthedifference= = .equals()3ClassandPrimitiveTypesInmemoryPrimitivety
Georgia Tech - EAS - 6792
Impact of Air Pollution on the South Asian MonsoonA Paper Review Siv Balachandran 04/26/071Overview Motivation South Asian Monsoon Aerosols/Haze in South Asia Impact of Air Pollution on Monsoon UNEP 2002 Ramanathan et al 2005 Chung et al
Georgia Tech - EAS - 6795
EAS 6795 Atmospheric AerosolsHomework Assignment 2 Dynamics of Single Particles (Due Oct. 5, 2007) 1. A 10 m diameter particle of unit density falls through air starting from rest. Calculate the time required for the particle to attain 95% of the fi
Georgia Tech - EAS - 6795
EAS 6795 Atmospheric AerosolsHomework Assignment 7, Coagulation (Due Dec. 7, 2007)1. Determine the Brownian collision frequency function for spherical, unit density particles having diameters of: 1.0 and 1.0 m 1.0 and 10.0 m 2. In an automobile exh
UNC - COMP - 110
COMP110 ObjectsandReferencesTabithaPeckM.S. February27,2008MWF33:50pm Philips3671AnnouncementsLab5dueFriday Program3dueTuesdayatmidnightRecitationworkonProgram3MidtermnextFriday2Questions?3TodayinCOMP110Strings,Classes,and
Georgia Tech - EAS - 6795
1 EAS 6795 Atmospheric AerosolsHomework Assignment 1: Describing Aerosol Populations (due Sept. ) 1. Using the aerosol size distribution measured in class, do the following: a) Complete the table started in class. Calculate the following, particle c
UNC - COMP - 110
COMP110 ClassesTabithaPeckM.S. March3,2008MWF33:50pm Philips367 1AnnouncementsProgram3duetomorrowbymidnight WednesdaycomewithreviewquestionsWednesdayofficehours?Fridaymidterm2Questions?3TodayinCOMP110Writeabankacco
UNC - COMP - 110
COMP 110 Static Methods and VariablesTabitha Peck M.S. March 24, 2008MWF 3-3:50 pm Philips 3671Announcements No Homework yet2Questions?3Today in COMP 110 Static Methods A little review4Methods Actions performed by objects smiley
UNC - COMP - 110
COMP 110 Designing and Overloading MethodsTabitha Peck M.S. March 26, 2008MWF 3-3:50 pm Philips 3671Announcements2Questions?3Today in COMP 110 Math Methods Designing Methods Overloading Methods4Math Methods abs(double n), returns
Georgia Tech - EAS - 6795
EAS 6795 Atmospheric AerosolsHomework Assignment 6, Evaporation/Condensation (Due Dec. 3, 2007) 1. Given the following aerosol size distribution (see below) calculate the H2SO4 characteristic lifetime if it is lost only by particle scavenging. Use t
Georgia Tech - EAS - 8803
ADVANCED ENVIRONMENTAL DATA ANALYSIS HOMEWORK #3 Function fitting 1) Fit a plane to the Pacific SST, SST ( x , y ) = x + y + , using the least square approach. The data is downloadable at http:/ocean3d.org/eas-8803/hw/03-hw/Feb98SST.mat . What are
Georgia Tech - EAS - 8803
SPRING SEMESTER 2008 EAS 8803 Land-Atmosphere InteractionGeorgia Institute of Technology School of Earth and Atmospheric SciencesInstructor:Robert E. Dickinson1, Professor, EAS Rong Fu2, Associate Professor, EAS1Ford ES&amp;T Bld. Rm. 3104 Office
UNC - COMP - 110
COMP 110 ArraysTabitha Peck M.S. March 31, 2008MWF 3-3:50 pm Philips 3671Announcements Program 4 assigned Wednesday Program 3 grades done! (Sorry so late)2Questions?3Today in COMP 110 Arrays4Rememberwhile(inputScore &gt;= 0) { games
Georgia Tech - EAS - 8803
ENVIRONMENTAL DATA ANALYSIS EAS 8803 HOMEWORK #3Generate on the computer the following timeseries:y (tn ) = 10 sin(w1tn ) + 5 cos(w 2tn ) + 2 cos(w 3tn ) + n (tn )where1 2 2 2 years ; w1 = 30 ; w 2 = 50 ; w 3 = 10 ; and 12 Nt Nt Nt n (tn ) is
UNC - COMP - 110
COMP 110 More ArraysTabitha Peck M.S. April 2, 2008MWF 3-3:50 pm Philips 3671Announcements Program 4 Due April 23 (thats 3 weeks!) This is a HARD program Start early Start early Start early2Program 4 Demo3Questions?4Today in CO
UNC - COMP - 110
COMP 110 More ArraysTabitha Peck M.S. April 7, 2008MWF 3-3:50 pm Philips 3671Announcements Lab 6 Friday Recitation Program 42Questions?3Today in COMP 110 Arrays4Sentences The (noun) (action verb) (adverb) The dog runs quickly
Georgia Tech - EAS - 8803
Water Quality Modeling: EAS 4803/8803 3 credit hours Required Textbook: Chen Zhu and Greg Anderson, &quot;Environmental Applications of Geochemical Modeling&quot; Cambridge University Press, Cambridge, UK, ISBN 0 521 00577 9. www.barnesandnoble.com or www.half
UNC - COMP - 110
COMP 110 2D ArraysTabitha Peck M.S. April 9, 2008MWF 3-3:50 pm Philips 3671Announcements Friday Recitation Program 4 Checking current progress for credit2Questions?3Today in COMP 110 Randomization without repeats 2D Arrays4Frida
Georgia Tech - MUSI - 3500
MUSI 3500 Introduction to Computer Music Fall, 2004 PROFESSOR: Dr. Gil Weinberg GT PHONE: 404.894.8939 HOURS: by appointment ROOM: Couch 102 MEETING TIMES: Tuesdays-Thursdays 3:05-4:25pm CLASS URL: http:/undertow.arch.gatech.edu/homepages/gweinberg/3
Georgia Tech - MUSI - 4450
MUSI4450Assignment3Youwillbecreatinga30secondcommercialforamythical(orrealbutoriginaltoyou) service,product,orevent.Therearenohardandfastrulesastocontentexceptthattherebeno profanityoroffensivesexual,racial,orreligiousreferences.Additionally,commons
Georgia Tech - ECE - 2001
ECESCHOOL OF ELECTRICAL AND COMPUTER ENGINEERINGSUMMER 2001Motorola Foundation Donates $1.5 MillionEstablishes Professorship and Endowed Chairhe Motorola Foundation has announced a $1.5 million gift to Georgia Tech to assist students inearn
Georgia Tech - ECE - 2001
Modeling of Power Distribution Networks for Mixed Signal ApplicationsJoong-Ho Kim*, Madhavan Swamhathan&quot;, and Youngsuk Sub**Dept. of Electrical and Computer Engineering, Georgia Institute of Technology Packaging Research Center 777 Atlanta Drive N.
Georgia Tech - ECE - 2002
ECE ConnectionSCHOOL OF ELECTRICAL AND COMPUTER ENGINEERINGSPRING 2002E ECECE s Undergraduates Learn the Art of CommunicationProfessor William E. Sayle turned to undergraduate student Kathleen Cobb and asked, If you could have lunch with an
Georgia Tech - ECE - 2002
ECE 2030AB Dr. Robert ButeraGroup Exercise #3 01 March 2002This is a group project. Your group can have 1-6 people in it. They will be informally graded, and you should all work together. Each member of your group should sign the top of the next.
Georgia Tech - ECE - 2002
Georgia Tech - ECE - 2025
EE-2025Georgia TechLecture 23 IIR Filters: H(z) &amp; Frequency ResponseREADING ASSIGNMENTS This Lecture: Chapter 8, pp. 263-279 Other Reading: Recitation: Ch. 8, pp. 261-272 POLES &amp; ZEROS01/18/09ECE-20252001rws/jMc2LECTURE OBJECT
Georgia Tech - ECE - 2025
GEORGIA INSTITUTE OF TECHNOLOGYSCHOOL of ELECTRICAL and COMPUTER ENGINEERINGECE 2025 Spring 2003 Problem Set #7Assigned: 14-Feb-03 Due Date: Week of 24-Feb-03 Reading: In SP First, Chapter 5: FIR Filters = Please check the Bulletin Board often. A
Georgia Tech - ECE - 2025
ECE-2025Spring-01INFORMATION LABS Room 252 in VanLeer Building Two weeks to do first lab MATLAB based computer projects MATLAB Help: next week in the eveningsLECTURE #1 Sinusoids 5-Jan-01 RECITATIONS EMPHASIS on Problem Solving Attend
Georgia Tech - ECE - 2025
Little Bits of MATLABJames H. McClellan School of ECE Georgia Tech27-March-1997ECE-2025 ECE-427019892001 James H. McClellan. This material was prepared by and is the property of the author. It should not be reproduced or distributed without the
Georgia Tech - ECE - 2030
ECE 2030Computer EngineeringFinal Exam ProblemProblem 1 (6 parts, 25 points)Assembly Language ProgrammingThis problem deals with a program to do chromakeying. The attached sheet lists the instruction set it uses. Chromakeying is used to sup
Georgia Tech - ECE - 2030
ECE 2030: Final ExamInstructions: You have 2 hours and 50 minutes to complete this exam. The exam is closed book. No calculators are allowed. Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Problem 8 _ _ _ __ _ _ _ _TOTAL_
UNC - COMP - 110
COMP 110 InheritanceTabitha Peck M.S. April 14, 2008MWF 3-3:50 pm Philips 3671Announcements2Questions?3Today in COMP 110 Inheritance4Inheritance Define a general class Later define specialized classes Specialized class inherits p
UNC - COMP - 110
COMP 110 InheritanceTabitha Peck M.S. April 16, 2008MWF 3-3:50 pm Philips 3671Announcements Help with Program 4 (Due next Wednesday) Final Monday, May 5 Philips 367 4:00 p.m.2Questions?3Today in COMP 110 More Inheritance4Inheri
Georgia Tech - ECE - 2030
ECE 2030: Test IIIInstructions: You have 80 minutes to complete this quiz. The quiz is closed book. No calculators are allowed.Problem 1 Problem 2 Problem 3 Problem 4 Problem 5_ _ _ _ _TOTAL_1) 20 points a) Draw a state transition diagram
UNC - COMP - 110
To randomize the array: (int)(5*Math.Random() *turns it into an integer and numbers between 0-4Sentinel Values Reference 2d array A[i][j] I= row j = column
Georgia Tech - ECE - 2030
0ECE 2030, Intro. To Computer Quiz No. 3: Apr. 2, 2004 Prof. John A. Copeland School of Electrical and Computer RULES. i ii. iiiName Eng., QUIZ 3GT#_ Seat No._EngineeringThis quiz is closed book. Calculators may not be used. Answer all quest
Georgia Tech - ECE - 2031
ECE 2031: Digital Design Laboratory Design LogbookEach team will be required to keep a logbook, documenting the design process for the end-of-theterm project. The logbook is intended to encourage collaboration and to aid in the documentation process
Georgia Tech - ECE - 2031
Assignment Sheet: Design Report ECE 2031: Digital Design LaboratoryLength: Point Distribution: *Due Date: 10 page maximum (body of the report) 500 points; submit one report per group Monday, July 28 no later than 12:00pm (noon) *Submit paper DIRECTL
Georgia Tech - ECE - 2040
School of Electrical and Computer Engineering ECE2040 Summer 2007, GT LorraineInstructor Professor George F. Riley Ofce: GTL 005 EMail: riley@ece.gatech.edu Webpage: http:/users.ece.gatech.edu/riley/ece2040/ Ofce Hours: Weekdays, 10:15 - 11:15 and b
Georgia Tech - ECE - 3040
John D. Cressler ECE 3040Microelectronic CircuitsECE 3040 Spring Semester 2008 School of Electrical and Computer Engineering Georgia Institute of Technology Dr. John D. Cressler When and Where:Lecture Place: Lecture Time: C341 Van Leer M-W-F 10:3
Georgia Tech - ECE - 3040
0AChapter 0 OverheadsGeorgia Institute of TechnologySchool of Electrical and Computer EngineeringJohn D. Cressler ECE 3040after Jaeger, Microelectronic Circuits, 1997after I. Ross, Proc. IEEE, vol. 86, p. 7, 19980BChapter 0 Overheads
Georgia Tech - ECE - 3040
Chapter 1 Reading AssignmentsECE 3040 Microelectronic CircuitsDr. John D. Cressler School of Electrical and Computer Engineering Georgia Institute of TechnologyTextbooks: (P = Pierret, J = Jaeger)Chapter 1 Semiconductors 1.1 semiconductor materi
Georgia Tech - ECE - 3040
ECE 3040 Dr. Alan Doolittle Microelectronic Circuits Homework #1Solutions NOTE: Some reference materials including tables, figures etc. handed out in class or in your text may be needed to solve these problems. 1.) Consider the drawing below. Let us
Georgia Tech - ECE - 3041
Evaluation Form ECE 3041Recommendation Report w/Mandatory ConsultationPrint clearly and legibly. Student Name_ Lab Section_ GT#_Writing Consultant__ 1st 2nd Did you attend a writing consultation?_Writing Assignment Number (circle one)Pledge o
Georgia Tech - ECE - 3041
ECE 3041 Assignment Sheet: Users Manual Cadence and Multisim SPICE Programs For 3041 Users Fall 2007Length Point Distribution Lecture Date Due Date 15 pages maximum; no minimum 0-90 points, plus 10 point homework assignment; regular letter grade bre
Georgia Tech - ECE - 3041
ECE 3041 Assignment Sheet: Recommendation Report A Comparison of Arbitrary Waveform Generators Fall 2008Length Point Distribution Lecture Dates Due Date no maximum, five page minimum 0-90 points, plus 10-point homework; regular letter grade breakpoi
Georgia Tech - ECE - 3041
ECE 3041 Assignment Sheet: Application Note Use of 1X and 10X Scope Probes Summer 2008 Length Point Distribution Lecture Date Due Date 12 page maximum; 4 page minimum 0-90 points, plus homework; regular letter grade breakpoints June 3, in lab June 27
Georgia Tech - ECE - 3042
ECE 3042 Assignment Sheet: Formal Lab Report with Evaluated Results and Uses MOSFET Amplifier Fall 2008Length Point Distribution Lecture Dates Consultation Dates Due Date 15 page maximum, excluding appendices, 3 page minimum 0-90 points, plus 10-poi
Georgia Tech - ECE - 3042
Evaluation Form ECE 3042Formal Lab Report with Mandatory Group ConsultationPrint clearly and legibly. Student Name_ Lab Section_ GT#_Writing Consultant__ 1st 2nd Did you attend a writing consultation with a draft? _Writing Assignment Number (ci
Georgia Tech - ECE - 3042
ECE 3042 WA 1 Assignment Sheet Memo with Recommendation National Instruments SPICE v. Cadence SPICE Fall, 2007 Length Point Distribution Lecture Date Due Date 4 page maximum (not including homework problems) 0-90 points, plus homework; regular letter
Georgia Tech - ECE - 3055
ECE 3055 Lecture 2 Instruction Sets Reading: Comp. Org. &amp; Design, Chap. 2, Sec.1-10, 19 Storage (Hard Disk) Input / Output (Console, Network, Printer, Speaker, Microphone, Camera, .)CPU Control, DatapathRandom Access Memory (RAM)The Five Classi
Georgia Tech - ECE - 3055