9781285096339_PPT_ch01 - Chapter 1 A First Program Using C...

Info icon This preview shows pages 1–11. Sign up to view the full content.

Chapter 1: A First Program Using C#
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Objectives Learn about programming Learn about procedural and object-oriented programming Learn about the features of object-oriented programming languages Learn about the C# programming language Write a C# program that produces output Learn how to select identifiers to use within your programs 2 Microsoft Visual C# 2012, Fifth Edition
Image of page 2
Objectives (cont’d.) Improve programs by adding comments and using the System namespace Write and compile a C# program using the command prompt and using Visual Studio 3 Microsoft Visual C# 2012, Fifth Edition
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Programming Computer program A set of instructions that tells a computer what to do Also called software Software comes in two broad categories System software Application software Machine language Expressed as a series of 1s and 0s 1s represent switches that are on, and 0s represent switches that are of 4 Microsoft Visual C# 2012, Fifth Edition
Image of page 4
Microsoft Visual C# 2012, Fifth Edition Programming (cont’d.) Part of the HelloWorld Program in machine language 5
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Programming (cont’d.) High-level programming language Uses reasonable terms such as “read,” “write,” or “add” instead of the sequence of on/of switches that perform these tasks Allows you to assign reasonable names to areas of computer memory Has its own syntax (rules of the language) Compiler Translates high-level language statements into machine language 6 Microsoft Visual C# 2012, Fifth Edition
Image of page 6
Programming (cont’d.) Programming logic Involves executing the various statements and procedures in the correct order to produce the desired results Debugging The process of removing all syntax and logical errors from the program Syntax errors are discovered through compilation Logical errors are discovered through testing 7 Microsoft Visual C# 2012, Fifth Edition
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Procedural and Object-Oriented Programming Procedural program Creates and names computer memory locations that can hold values ( variables ) Writes a series of steps or operations to manipulate those values Identifier A one-word name used to reference a variable or method Camel casing Typically used for variables Pascal casing Typically used for methods 8 Microsoft Visual C# 2012, Fifth Edition
Image of page 8
Microsoft Visual C# 2012, Fifth Edition Procedural and Object-Oriented Programming (cont’d.) Procedures or methods Logical units that group individual operations used in a computer program Called or invoked by other procedures or methods The starting method is the Main() method 9
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Procedural and Object-Oriented Programming (cont’d.) Object-oriented programming (OOP) An extension of procedural programming Objects Similar to concrete objects in the real world Contain their own attributes and behaviors The attributes of an object represent its characteristics The behaviors of an object
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '10
  • Thomas
  • Fifth Edition, Microsoft Visual

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern