×

### Let's log you in.

or

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

×

or

## COSC236 example lab

by: Kelsey Voelker

2

0

2

# COSC236 example lab COSC 236

Kelsey Voelker
Towson

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

×
Unlock Preview

example lab practice
COURSE
Intro to Computer Science 1
PROF.
Dr. Alkharouf
TYPE
Class Notes
PAGES
2
WORDS
KARMA
25 ?

## Popular in Computer science

This 2 page Class Notes was uploaded by Kelsey Voelker on Sunday October 16, 2016. The Class Notes belongs to COSC 236 at Towson University taught by Dr. Alkharouf in Fall 2016. Since its upload, it has received 2 views. For similar materials see Intro to Computer Science 1 in Computer science at Towson University.

×

## Reviews for COSC236 example lab

×

×

### 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: 10/16/16
COSC 236 Dr. Alkharouf Lab 2* 1. Write a complete Java program that produces the following output (use System.out.println() to print each line to the screen): What is the difference between a ' and a "?  Or between a " and a \"? One is what we see when we're typing our program. The other is what appears on the "console." 2. Write a complete Java program that produces the following output (use System.out.println() to print each line to the screen): A "quoted" String is 'much' better if you learn the rules of "escape sequences." Also, "" represents an empty String. Don't forget: use \" instead of " ! '' is not the same as " 3. Write a program that stores the integers 62 and 99 in variables, and stores their sum in a  variable called total. Print out the total to the screen. 4. Write a program that declares the following:  a String variable named name  an int variable named age  a double variable named annualPay Store your age, name, and desired annual income as literals in these variables. The program  should display these values on the screen in a manner similar to the following: My name is Joe Smith, my age is 26 and I hope to eary \$100000.0 per year. 5. Write a program that has the following String variables: firstName, middleName, and  lastName. Initialize these with your first, middle, and last names. The program should also  have the following char variables: firstInitial, middleInitial, and lastInitital. Store your  first, middle, and last initials in these variables. The program should display the contents of  these variables on the screen. *  Questions modified from: Starting Out with Java: From Control Structures through Data  Structures. Second Edition, by Tony Gaddis and Godfrey Muganda. Deliverables: Copy and paste your code into a Word document and submit that word doc along with the .java files through Black Board.

×

×

### 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

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

Kyle Maynard Purdue

#### "When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the material...plus I made \$280 on my first study guide!"

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

#### 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