Limited time offer 20% OFF StudySoup Subscription details

UGA - CSCI - Study Guide - Midterm

Created by: Khan Notetaker Elite Notetaker

UGA - CSCI - Study Guide - Midterm

School: University of Georgia
Department: Computer Science and Engineering
Course: Introduction to Computing and Programming
Term: Spring 2019
Tags: programming and basic java
Name: Test 2 Studyguide
Description: these notes go over loop types (while, do-while, for, for-each), nested loops, break statements, scopes, global constants, arrays, and linear searches.
Uploaded: 03/26/2019
Join more than 18,000+ college students at University of Georgia who use StudySoup to get ahead
2 Pages 21 Views 16 Unlocks
  • Better Grades Guarantee
  • 24/7 Homework help
  • Notes, Study Guides, Flashcards + More!
Join more than 18,000+ college students at University of Georgia who use StudySoup to get ahead
School: University of Georgia
Department: Computer Science and Engineering
Course: Introduction to Computing and Programming
Term: Spring 2019
Tags: programming and basic java
Name: Test 2 Studyguide
Description: these notes go over loop types (while, do-while, for, for-each), nested loops, break statements, scopes, global constants, arrays, and linear searches.
Uploaded: 03/26/2019
2 Pages 21 Views 16 Unlocks
  • Better Grades Guarantee
  • 24/7 Homework help
  • Notes, Study Guides, Flashcards + More!

Unformatted text preview: 12 Study Guide Types of Loopt. do-while loop will execute badly once then te fox boolean condition each teration after - do 3 loody 9 Start 5 while complition), While loop- True D leyecute body only blod condit If cool. cordon is true than 8 while cool.condition of the cition end false Start for looptubesecute a finite amount of iterations. - for i<10; i++) z body Initial Zone incrementing Conto Variade_ COS 1N What is the output for: 1) For lint is to i>100:+) answer the body does not execute becerise the condition.bas not met. Ich it count=0 while ccount to) Coxt- arece answer this is an infinite loop ble the ystem.out.pontin(count); Starting police satisfies the condition mons for non- answer: 0, ble the point is outside of the Sptem.out.print h i loce, so the topp Bully Perodes 14 priet. Nested in 3dere because itonbas net met 2) int count=0 white counteto){ Connte answer this is an infinite loop bit the system.out.printing count); Starting valve satisfies the condition monts o for en noin-- answer: 0, ble the point is outside of the System.out.printhini loop, so the toop Bully iterades 14 print Nested. Loop - to trace a nested loopiunte alown the value of each loop counter os it changes during loop execution (variabhe table) - if any output change in the vaca ? happens, write it down next to the tally of loop lourdes nested look are les placed win a loopnested for loops are common f - for (int i=0:43:1) its print pside for Cintjoi jij ) { Tout 1 System.out printin Hersten 10 lode and excom cross 3:0 0 for 1 iteration of the outside teatur 2 loop, the inade loop will fully execute before the next cuiride loop Heroton NOO 1-ollooutput foise LO The break Statements When there is a break Statement the loop Simmediately. terminated, then the programa Costrol_resumes of the next statement following the loop. e contation] foc Cinta 1 < 10; i++ if ( =5){ breaki System.out.printin(i); break Statements are considered and programming ble they can couse.confulon understanding code. It can also cause memory. Jeaks or a crash due to a loop abruptly ending wla resolve. break statements ore often in burken Statements. Cominue statements-mostly used loops to redirect flow.control to begioning of the loop for t x t iteration cochoute Leer a 1-2-3S-le Gondoa System.out.printing j***) code de o scope - portion of a program where overade exists. A variable's scope is from its okecaxabon to the end of the block ( 3) where tlocos colags). Constant vorable that can was declared it in a for loop, the vexable only exists in that loop

Join StudySoup for FREE
Get Full Access to UGA - Study Guide - Midterm
Join with Email
Already have an account? Login here
×
Log in to StudySoup
Get Full Access to UGA - Study Guide - Midterm

Forgot password? Reset password here

Forgot password? Reset your password here

I don't want to reset my password

Need help? Contact support

Need an Account? Is not associated with an account
Sign up
We're here to help

Having trouble accessing your account? Let us help you, contact support at +1(510) 944-1054 or support@studysoup.com

Got it, thanks!
Password Reset Request Sent An email has been sent to the email address associated to your account. Follow the link in the email to reset your password. If you're having trouble finding our email please check your spam folder
Got it, thanks!
Already have an Account? Is already in use
Log in
Incorrect Password The password used to log in with this account is incorrect
Try Again

Forgot password? Reset it here