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

Introduction to Computing

by: Jaden Jakubowski

Introduction to Computing CSC 116

Jaden Jakubowski
GPA 3.94

Suzanne Balik

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Suzanne Balik
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 13 page Class Notes was uploaded by Jaden Jakubowski on Thursday October 15, 2015. The Class Notes belongs to CSC 116 at North Carolina State University taught by Suzanne Balik in Fall. Since its upload, it has received 36 views. For similar materials see /class/223811/csc-116-north-carolina-state-university in ComputerScienence at North Carolina State University.

Similar to CSC 116 at NCS

Popular in ComputerScienence


Reviews for Introduction to Computing


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: 10/15/15
Boolean Variables Boolean ValuesExpressions Review quotExclusive or vs quotInclusive or De Morgan s Laws Short Circuit Evaluation Logical Operator Precedence Examples TaxCalculator Type boolean boolean A primitive type to represent logical values A boolean expression produces either true or false The ltconditiongts in if statements for loops are boolean Examples boolean minor age lt 21 boolean expensive iPhonePrice gt 50000 boolean iLoveCS true if minor SystemoutprintlnquotCan39t purchase quot quotalcoholquot You can create boolean variables pass boolean parameters return boolean values from methods mquot V Copyright 2006 by Pearson Education Logical operators ampamp II a Boolean expressions can use logical operators Copyright 2006 by Pearson Education Operator Description Example Result ampamp and 9 6 ampamp 2 lt 3 true II or 2 1 lt 5 true 1 not 7 gt 0 false Truth tables of each operator used with boolean values p and q p q p ampampq p H q p p true true true true true false true false false true false true false true false true false false false false quotExclusive or vs quotInclusive or We generally use quotexclusive or when speaking quotI ll do my homework or go to the party means I ll do one or the other but not both Programming uses quotinclusive or An expression is true if either or both conditions are true 2gt34lt5 F T T 2lt34lt5 TTT De Morgan s Laws pampampmunlm NXltWNvlt Xgtvvgtz Hxltyampampyltz De Morgan s Laws pm pampampq xltyampamp yltz Xgty ampamp ygtz Wltvvltz Short Circuit Evaluation Short Circuit Evaluation The property of the logical operators ampamp and I that prevents the second operand from being evaluated if the overall result is obvious from the value of the first operand Examples 2 gt 3 ampamp 4 lt 5 F ampamp F 2lt3 H 4gt5 TT Logical Operator Precedence Not Highest Precedence And ampamp Or Lowest Precedence Example 2lt3 4gt5 ampamp 6gt7 HINT When in doubt use parentheses if Statement Example if xlty true BAD Redundant if x lt y BETTER Method Example if x lt V OK return true else return false return x lt y COOLER Logical Operator Example ifxltY BAD ifylt Z if xltyampampyltz BETTER TaxCalculator Example public static void mainString args Scanner console new ScannerSystemin Systemoutprint Married yn String answer consolenext boolean isMarried false if answerstartsWith y answerstartsWith Y isMarried true Systemoutprint ncome int income consolenextnt double tax calculateTaxisMarried income Systemoutprintf Tax S2fn tax public static double calculateTaxbooean isMarried int income double tax 0 if isMarried else if income lt 16000 tax 10 income else if income lt 64000 tax 1600 15 income 16000 else tax 8800 25 income 64000 if income lt 8000 tax 10 income else if income lt 32000 tax 800 15 income 8000 else tax 4400 25 income 32000 return tax NOTE Class constants should be used instead of magic numbers


Buy Material

Are you sure you want to buy this material for

25 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!"

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

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.