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


by: Trace Mante MD


Trace Mante MD

GPA 3.61


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

Study Guide
50 ?




Popular in Course

Popular in Computer Science and Engineering

This 5 page Study Guide was uploaded by Trace Mante MD on Monday October 26, 2015. The Study Guide belongs to CSCE 145 at University of South Carolina - Columbia taught by Staff in Fall. Since its upload, it has received 34 views. For similar materials see /class/229591/csce-145-university-of-south-carolina-columbia in Computer Science and Engineering at University of South Carolina - Columbia.

Popular in Computer Science and Engineering




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/26/15
CSCE 145 Sections 4 5 6 Study Guide Second Midterm Chapter 5 Miscellaneous This chapter covers the basics of fence post errors Which you should be able to explain This chapter also covers the issue of the scope of temporary variables as in the question whats Wrong With the following code77 public class ThisClass extends Object public ThisClass either add or subtract depending on the last parameter public int myIncrementint inValue int theAddin boolean addItInQ int thisValue if addItInQ thisValue theAddin else thisValue theAddin return thisValu public int MyMethod1int inValue always add in the increment value public int MyIncrementint inValue int theAddin thisValue theAddin return thisValue public void MyMethod2int inValue2 public class ThisClass extends Object The switch statement has not been covered and essentially Will not be cov ered You are free to use it or free to ignore it and just use ifelse if statements You should know how to nest and cascade if statements and you should know what happens if you dangle the else because you didn t use braces page 250 I will not repeat not do a trick question on this I do not expect you to be able to read the intricacies of bad code but I do expect you to be able to write correct nestedcascaded if statements Patterns pp 257E Loop and a half You should be able to write a loop with an initial segment before the steady state of the loop iterationi You should be able to write a loop with a nal segment after the steady state of the loop iterationi Temporary variable You should be able to write a for or while loop with a counter that is incre mented or referenced only when an if statement happens to be true Counting pattern You should be able to write a while loop with a counter that is always incre mented inside each iteration for loops versus while loops You should know when a for loop is more appropriate than a while loop and vice versa Boolean expressions You should be able to write a correct boolean expression or series of expres sions Again I will not play games with asking you for evaluating an expression that has no parenthesesi You should be writing your expressions with ade quate parentheses to make the order of evaluation crystal clear and you should recognize the absence of parentheses to be inherently evili General Comments You should be able to write simple methods that do not return a value such as public void myMethod public void myMethodO and you should be able to write simple methods that do return a value such public String myUtherMethodO String returnValue returnValue quotpneumonoultramicroscopicsilicovolcanoconiosisquot return returnValue public String myUtherMethod Chapter 6 You should be able to write multiple constructors for a class7 to know why and when you can do this7 and why you would want to do this You should know the proper proper in this case being interpreted under Buell s strict rules use of this and of accessor and mutator methods You should be able to explain the use of final and you should be able to explain what happens when one uses static final as in the two routines in the Utilities java modules in the examples I gave you I have decided that I will give you one page that contains the code for the ScannerUpen and the PrintWriterUpen methods That way7 I can expect you to be able to use those methods and understand what they do without requiring you to be able to reproduce those methods You should read and thoroughly understand the bottom of page 309 on the use of temporary versus instance variables Arithmetic Input and Output We covered some material on arithmetic and on input and output that is not in Chapters 5 through 8 This material is in fact on the exam You should be able to write correct code for output using System out printlnstuff You should be able to tell me the effect of a statement such as Systemoutprintfquot od 2222 quotof YYYY os onquotixtheString An acceptable answer is WI his prints the value of i7 assuming that i is an int variable7 then the string ZZZZ with a blank space on each side7 then the value of x as a oating point number7 assuming that x is a float or double variable7 then the string YYYY with a blank space on either side7 and then the string theString7 followed by a newline so that the next line of output would start on the next line Note I will not7 repeat not7 expect you to parrot back the intricacies of output of oating point numbers using something like System out printfquot 11 4f onquot 1234567890123 Chapter 7 As mentioned above you should know about different numeric data types and about character boolean and String variablesi You should know the syntax of the methods on page 350 but you do not need to know the syntax of the million and one other methods for a String variablei Accessors and mutators yesi Chapter 8 If given a piece of code similar to the Person class in the text you should be able to create a simple class like the DateTime class so that the original code could be simpli ed You should be able to deal with try catch for exception handling And remember you ll have an example ofthis in the sample code for the Ut i1 it ies java classi General Comment There are a great many things about programming that require remembering speci c and detailed rules This include o Exactly what the precedence order is for evaluating boolean or arithmetic expressions without any parenthesesi o Exactly what gets printed in something like a o 127f format if for some reason this format isn7t going to provide complete accuracy for the num bers being printed Exactly what substring is extracted from a string using one of the par ticular methods in the String class This is included here because the met 0 public String substringint beginIndex int endIndex returns a new string that is a substring of this string begining at the speci ed beginIndex and extending to the character at index endIndex 1 so the trick is to remember the minus one In these and similar contexts what I expect you to be able to do is the following 0 You should recognize any and all instances of this sort of thing as places where arcane and speci c rules are in effect and you need to be especially careful to get it right 0 You should be able to nd the reference information that says exactly how to do it right 0 You need not be able to tell me exactly What happens in an instance in Which there might be a problem but you should be able to recognize that a problem might exist If you follow this approach then you Will be able to Write correct code yourself and you Will be able to recognize instances in other people s code Where there might be a problemi Remember that debugging a program is an empirical process and not a metaphysical process That is When a program is not producing the correct output its because it is doing something different from What you intended The rst and most important debugging step is to nd out What in fact the program is doing not to sit back and contemplate the philosophical or moral nature of the program as Written


Buy Material

Are you sure you want to buy this material for

50 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

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

Amaris Trozzo George Washington University

"I made $350 in just two days after posting 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


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.