Introduction To Programming
Introduction To Programming CSC 1760
Popular in Course
Popular in ComputerScienence
This 5 page Class Notes was uploaded by Chase Senger on Sunday October 25, 2015. The Class Notes belongs to CSC 1760 at University of North Carolina at Pembroke taught by Charles Lillie in Fall. Since its upload, it has received 26 views. For similar materials see /class/229075/csc-1760-university-of-north-carolina-at-pembroke in ComputerScienence at University of North Carolina at Pembroke.
Reviews for Introduction To Programming
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/25/15
N E 4 V39 6 CSC 1760 Introduction to Programming Lesson 2 Eclipse and Coding Standards Due Date 192009 Textbook Introduction to Java Programming Brief Version Seventh Edition Author Y Daniel Liang 2009 Prentice Hall a Reference None Program Grading Standards Each program is graded using the following standard a Program compiles without any compile errors or warnings 25 b Program executes without any runtime errors 25 c Program produces correct results 25 d Program contains correct header information 15 e Program uses coding standards 10 Eclipse A software development environment SDE written in Java to provide software developers and administrators an integrated development environment IDE It has a source code editor compiler build automation tools and debugger that specifically support Java programming It also provides and manages a storage structure for easier project management Coding Standards Coding standards help programmers organize and manage their programs In this class we will use the coding standards developed and maintained by Sun Microsystems specifically for Java programs Tasks a Become familiar with Eclipse b Review the help file that is part of Eclipse c Review the Eclipse tutorial at httpwwwuncpeduhomelilliecSpring2009EclipseTutorialEclipseTutorialhtm d Practice using Eclipse by entering and running the programs in the Practice Programs section at the end of this paper Assignment due None Practice Programs 1 FirstPro gram Student Name Date Due 192009 Date Submitted Program Name FirstProgram Program Description Displays My first java program to computer monitor public class FirstProgram public static void mainstring args Systemoutprintln My first java program 2 AddTwoNumbers k Student Name Date Due 192009 Date Submitted Program Name AddTwoNumbers Program Description Add two numbers and display the results k package AddTwoNumbers public class AddTwoNumbers public static void mainString args int numl 5 int num2 6 int num3 numl num2 Systemoutprintlnnuml quot quot num2 quot quot num3 3 GetInput k Student Name Date Due 192009 Date Submitted Program Name GetInput Program Description Input two numbers and display the sum k package GetInput import javautilScanner public class GetInput public static void mainString args Scanner input new ScannerSystemin SystemoutprintquotEnter an integer quot int numl inputnextInt SystemoutprintquotEnter a second integer quot int num2 inputnextInt int num3 numl num2 Systemoutprintlnnuml quot quot num2 quot quot num3 CSC 1760 Introduction to Programming Lesson 7 Elementary Programming Due Date 1302009 Textbook Introduction to Java Programming Brief Version Seventh Edition Author Y Daniel Liang 2009 Prentice Hall a Chapter 2 Overview Demonstrate elementary programming skills Tasks a Fquot 0 Write a program named CharEscapej ava that displays the following exactly as show Character Escape Sequence Name Unicode Code t Tab u008 Backslash u005C Single Quote u0027 Double Quote u0022 Note you will have to use character escape sequences for tab linefeed backslash single quote and double quote Write a program named ShortHand java that uses short hand operators such as var var var var Write a program named ToLowercasej ava that inputs an uppercase letter and converts it to a lowercase letter The character is typed in the source code as a literal value Hint In the ASCII table see Appendix B in the textbook uppercase letters appear before lowercase letters The offset between any uppercase letter and its corresponding lowercase letter is the same So you can nd a lowercase letter from its corresponding uppercase letter as follows int offset int a 7 int A int unicodeForUppercase intuppercase int unicodeForLowercase unicodeForUppercase offset char lowercase charunicodeForLowrecase Note how casting is used to get to the value needed Note2 You will need to use the following code to input a single character using Scanner Scanner input new ScannerSystemin System outprint quotEnter an uppercase character char uppercase input next charAt O quotgt 4 Assignments due a CharEscape j ava b ShortHand j ava c ToLowercase java