190 likes | 392 Views
CSC 1760 Introduction to Programming. Spring 2013. Course Overview. Intense course in programming Implementing concepts of structured programming and algorithmic analysis Emphasis on application Credit, 3 semester hours. COREQ: CSC 1750. Course Overview.
E N D
CSC 1760Introduction to Programming Spring 2013
Course Overview • Intense course in programming • Implementing concepts of structured programming and algorithmic analysis • Emphasis on application • Credit, 3 semester hours. • COREQ: CSC 1750.
Course Overview • http://www.uncp.edu/home/lilliec • Blackboard • CSC 1760 • Syllabus • Assignments • Homework Assignments • Slides • Handouts • Follows CSC 1750 course structure
Course Overview • Introduction to Eclipse • Lessons 1 - 2 • Chapter 1: Introduction to Computers, Programs, and Java • Lesson 3 • Chapter 2: Elementary Programming • Lessons 4 - 7 • Chapter 3: Selections • Lessons 8 – 10 • Chapter 4: Loops • Lessons 11 – 12 • Exam 1
Course Overview • Chapter 5: Methods • Lessons 13 -15a • Chapter 6: Single-DimentionalArrays • Lessons 16 - 20 • Chapter 7: Multidimensional Arrays • Lessons 21 – 21a • Final Exam
Programming Style and Documentation • Appropriate Comments • Naming Conventions • Proper Indentation and Spacing Lines • Block Styles
Appropriate Comments Include a summary at the beginning of the program to explain what the program does, its key features, its supporting data structures, and any unique techniques it uses. Include your name, class section, instructor, date, and a brief description at the beginning of the program.
Homework Identifiers /*********************************************************** * * Student Name: * Date Due: 8/26/2011 * Date Submitted: * Program Name: HW713Write the following method that returns the * location of the largest element in a two-dimensional array. * * public static int[] locateLargest(double[][] a) * * The return value is a one-dimensional array that contains two elements. * These two elements indicate the row and column indices of the largest * element in the two dimensional array. Write a test program that prompts * the user to enter a two-dimensional array and displays the location of the * largest element in the array. * Program Description: Write a program that prompts the user to enter a * social security number in the format DDD-DD-DDDD, where D is a * digit. The program displays "valid SSN" for a correct social security * number and "invalid SSN" otherwise. * **********************************************************/ • Each program must have a comment at the very beginning with the following information
Naming Conventions • Choose meaningful and descriptive names. • Variables and method names: • Use lowercase. If the name consists of several words, concatenate all in one, use lowercase for the first word, and capitalize the first letter of each subsequent word in the name. For example, the variables radius and area, and the method computeArea.
Naming Conventions, cont. • Project names: • Capitalize the first letter of each word in the name. For example, the project name Lesson01 • . Package names: • Use lowercase. If the name consists of several words, concatenate all in one, use lowercase for the first word, and capitalize the first letter of each subsequent word in the name. For example, the package name computeArea • Class names: • Capitalize the first letter of each word in the name. For example, the class name ComputeArea. • Constants: • Capitalize all letters in constants, and use underscores to connect words. For example, the constant PI and MAX_VALUE
Proper Indentation and Spacing • Indentation • Indent two spaces. • Spacing • Use blank line to separate segments of the code.
Block Styles Use end-of-line style for braces.
Grading Standards • Each program is graded using the following standard: • Program compiles without any compile errors or warnings: 25% • Program executes without any runtime errors: 25% • Program produces correct results: 25% • Program contains correct header information: 15% • Program uses coding standards: 10%
Programming Errors • Syntax Errors • Detected by the compiler • Runtime Errors • Causes the program to abort • Logic Errors • Produces incorrect result
Introduction to Eclipse • A software development environment (SED) written in Java to provide software developers and administrators an integrated development environment (IDE). It has a source code editor, compiler, build-in automation tools, and debugger that specifically support Java programming. It also provides and manages a storage structure for easier project management.
Eclipse Workspace • You should create a workspace for CSC 1760 on a flash drive or on the desktop of the computer in the lab. • NOTE: if you use the desktop of the computer in the lab you will loose the work when you log-off the computer, so be sure to save it on a flash drive or on blackboard. • The programs to be graded will be placed in your Blackboard account for this course.
Eclipse Workspace • To create programs • Create a Project • File New Java Project • Create a Package • File New Package • Create a Class • File New Class • The class file is the java program • It will be named progName.java where progName is what you name it when it is created.
Homework Identifiers /*********************************************************** * * Student Name: * Date Due: 8/26/2011 * Date Submitted: * Program Name: HW713Write the following method that returns the * location of the largest element in a two-dimensional array. * * public static int[] locateLargest(double[][] a) * * The return value is a one-dimensional array that contains two elements. * These two elements indicate the row and column indices of the largest * element in the two dimensional array. Write a test program that prompts * the user to enter a two-dimensional array and displays the location of the * largest element in the array. * Program Description: Write a program that prompts the user to enter a * social security number in the format DDD-DD-DDDD, where D is a * digit. The program displays "valid SSN" for a correct social security * number and "invalid SSN" otherwise. * **********************************************************/ • Each program must have a comment at the very beginning with the following information