The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Please see attached pdf document. Follow the instructions and submit the Lab5.java to me. Please see attached photo for which version of Netbeans that needs to be used for this project. (Netbeans IDE 8.2)
Â
CS 171GLab 5 – Programming with If Statements and LoopConditionals and LoopsIn the Java programs you've seen so far, we've only performed statements in sequence,meaning step-by-step, in order.Now we will examine programming statements that allow usto:•make decisions (conditionals)•repeat processing steps (loops)Flow of ControlUnless specified otherwise, statements are executed one statement after another,insequence.Some programming statements allow us to decide whether or not to performatask.These decisions are based on boolean expressions (or conditions) thatevaluate to true or false.The order of statement execution is called theflow of control.Conditional StatementsA conditional statement lets us choose which statement will be executed next.Therefore they are sometimes called selection statements.Conditional statements giveus the power to make decisions.Java allows us to make decisions with theifstatementand theif-else statement.TheIfStatementThe if statement has the following syntax:if ( condition ){// perform these statements}The If-elseStatementThe if-elsestatement has the following syntax:if ( condition ){// perform these statements if condition is true}else {// perform these statements if condition is false}Theconditionmust be aboolean expression. It must be eithertrue or false.
Attachments:
-----------