×

### Let's log you in.

or

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

×

or

by: Jinyoung Oh

277

1

2

# CSE 142 Midterm Study Guide CSE 142

Marketplace > University of Washington > ComputerScienence > CSE 142 > CSE 142 Midterm Study Guide
Jinyoung Oh
UW
Computer Programming I
Stuart Reges

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

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

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

×
Unlock Preview

You guys will want this. It is made based on the actual previous midterm exams.
COURSE
Computer Programming I
PROF.
Stuart Reges
TYPE
Study Guide
PAGES
2
WORDS
CONCEPTS
midterm, CSE 142
KARMA
50 ?

## Popular in ComputerScienence

This 2 page Study Guide was uploaded by Jinyoung Oh on Monday November 2, 2015. The Study Guide belongs to CSE 142 at University of Washington taught by Stuart Reges in Summer 2015. Since its upload, it has received 277 views. For similar materials see Computer Programming I in ComputerScienence at University of Washington.

×

## Reviews for CSE 142 Midterm Study Guide

×

×

### What is Karma?

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

Date Created: 11/02/15
1 Expressions a Evaluation priority I ii iii iv v vi Parenthesis Unary operators positive negative Multiplicative operators Additive operators addition subtraction Assignment operators Relational operators 1 lt gt lt gt 2 3 ampamp 4 b Make sure the answer is in the right form i ii iii iv Integer 1 7 10 Double 10 35 1025 String quothello quot121 4982 Boolean true false c mod remainder d Expression between I ii iii iv Integers integer answer Integer and double double answer Doubles double answer Integer and string string 1 Integer string merges them together 2 Ex12 7 2 1873 a Evaluate parenthesis first then evaluate from left to right b Answer quot37 2 1153 Anytime you see ampamp or it is a Boolean problem 1 True ampamp True True I True True I False True 2 True ampamp False False ampamp False False False False 2 Parameter mystery a If there are operations in the parameter evaluate them first b Tip Reset the variables in the void method as first second third and put them in the corresponding spots in println statement 1 public static void foo int two int one int three Systemoutprintlnthree are approximately two plus one Set it to foo first second third prints quotthird are approximately first plus second Pay close attention to what is passing 1 String pay dollar paymentpay passing quotdollarquot since pay quotdollarquot paymentquotdollar it is the same thing as paymentpay 3 fese simulation a b c d e Every time something starts with If everything goes to the test Else something that didn t pass if test goes through Something inside parenthesis is test If the test is true statement in executes Test does not change any value Assignment changes the value Pay attention to what is printed 4 While loop mystery a b c while lttestgt ltstatementgt execute ltstatementgt while lttestgt is true Test gt if test is true gt execute statement gt back to test Test gt if test is false gt break the loop and go all the way to the statements after while loop Pay attention to what is printed and how many times the statement in while loop executes Same as ifelse simulation test does not change any value and assignment in the statement changes the actual values 5 Assertion a b Point A is usually before the loop Value in parameter can be anything But you know the values that are set at this moment There will be a point right underneath the while Be sure that you don t get tricked It can come straight from beginning or can already be processed in the loop and went back to the test again For the last point after the while loop is closed means that the test for while loop became false 6 Programming a public static lttypegt ltnamegt ltparameter1gt ltparameter2gt 39 points i quotWrite a static method named ltnamegt public static ltnamegt ii quotthat takes ltsomething1gt ltsomething2gt ltsomething3gt they are the parameters Don t forget that the format of ltparametergt is lttypegt ltnamegt iii and returns a lttypegt there s the type of method If there s none then the type will be void Cumulative problems use for loop while loop if problem says until Be careful on fencepost problem Simple truefalse problem think about using ifelse Coun ng i Construct an integer that keep tracks of count ii While condition 1 If counting condition happens count 2 Else count initial value when problem requires to count something in row return statement immediately breaks loops and ends the method

×

×

### BOOM! Enjoy Your Free Notes!

×

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

Amaris Trozzo George Washington University

#### "I made \$350 in just two days after posting my first study guide."

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

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

#### STUDYSOUP CANCELLATION 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 support@studysoup.com

#### STUDYSOUP REFUND POLICY

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: support@studysoup.com

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 support@studysoup.com