New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

CSC111A Week of February 15th Notes

by: Amanda Howard

CSC111A Week of February 15th Notes CSC 111A

Marketplace > Wake Forest University > ComputerScienence > CSC 111A > CSC111A Week of February 15th Notes
Amanda Howard
GPA 3.48
View Full Document for 0 Karma

View Full Document


Unlock These Notes for FREE

Enter your email below and we will instantly email you these Notes for Intro CS-Genl Purpose Java

(Limited time offer)

Unlock Notes

Already have a StudySoup account? Login here

Unlock FREE Class Notes

Enter your email below to receive Intro CS-Genl Purpose Java notes

Everyone needs better class notes. Enter your email and we will send you notes for this class for free.

Unlock FREE notes

About this Document

These notes cover the end of conditional statements and the beginning of loops.
Intro CS-Genl Purpose Java
Prof Daniel A. Canas
Class Notes
comp, programming, Computer Science, CSC11A




Popular in Intro CS-Genl Purpose Java

Popular in ComputerScienence

This 3 page Class Notes was uploaded by Amanda Howard on Thursday February 18, 2016. The Class Notes belongs to CSC 111A at Wake Forest University taught by Prof Daniel A. Canas in Winter 2016. Since its upload, it has received 29 views. For similar materials see Intro CS-Genl Purpose Java in ComputerScienence at Wake Forest University.

Similar to CSC 111A at WFU

Popular in ComputerScienence


Reviews for CSC111A Week of February 15th Notes


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/18/16
FEBRUARY 16, 2016­ NO CLASS FEBRUARY 18, 2016 Conditional Expression  Shorthand for if statements  Variable=(condition) ? expWhenTrue : expWhenFalse  Basically if the condition is met then the first exp is printed, if not than the second is printed  Example: o If the grade is greater than 70 the program will print “Passed” o If the grade is less than 70  the program will print “Failed” Double/Float Comparison  Doubles and floats are not exact, for example:  Expected (or entered) value Actual (how it is actually stored) 0.7 0.699999999999999999994512575 0.3 0.29999999999999999999974578 0.0 ­0.000000000000000000000555123  This inaccuracy is due to the fact that these decimals cannot be correctly represented in binary by  the computer  This makes it difficult to have an if statement with the condition being that a float or double is  equal to 0.0 o To fix this take the absolute value of the double minus 0.0 and then ask if it is less than . 001 o Basically you’re asking if the difference between the variable and the number you want is less than .001, instead of asking if they’re the same because they won’t be Loops  Repeats a series of instructions  For example: when grades are calculated the instructions might be to average grades and those  instructions would be continued until there are no more grades  Loops use while statements to execute their instructions  Example: o In this case adding 1 to the counter each time a grade is entered allows the program to  keep track of the number of grades in the system until the desired number is reached o The program will continue to loop back and continue adding grades to the total until it  has all the grades, or until counter=5 this case o Here would be an example of the finished program to calculate your final grade o Variations on this are possible, for example: numberOfGrades can be made a scanner that will read the number of grades inputted by the user


Buy Material

Are you sure you want to buy this material for

0 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.