Methodologies c programming c program elements create

This preview shows page 11 - 21 out of 70 pages.

methodologies C# programming C# program elements Create a C# program in Visual Studio C# Programming: From Problem Analysis to Program Design 11
Image of page 11

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 12 Software Development Process Programming is a process of problem solving Often an iterative process Successful problem solvers follow a methodical approach Steps in program development process: Analyze the problem, based on problem specification Design a solution Code the solution Implement the code Test and debug
Image of page 12
C# Programming: From Problem Analysis to Program Design 13 Step 1: Analyze the Problem Precisely what is software supposed to accomplish? -- Understand the problem definition o What kind of data will be available for input? o What types of values (i.e., whole numbers, alphabetic characters, and numbers with decimal points) will be in each of the identified data items? o What is the domain (range of the values) for each input item? o Will the user of the program be inputting values? o If the problem solution is to be used with multiple data sets, are there any data items that stay the same, or remain constant , with each set?
Image of page 13

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 14 Analyze the Problem ( continued ) Figure 1-3 Program specification sheet - car rental agency problem
Image of page 14
C# Programming: From Problem Analysis to Program Design 15 Analyze the Problem ( continued ) May help to see sample input for each data item Figure 1-4 Data for car rental agency
Image of page 15

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 16 Step 2: Design a Solution Several approaches Procedural and object-oriented methodologies Object-oriented approach Focus is on determining data and methods (behaviors) Class diagram Figure 1-5 Class diagram of car rental agency Name of class Data characteristics Actions to be performed on the data
Image of page 16
C# Programming: From Problem Analysis to Program Design 17 Design ( continued ) Structured procedural approach Process oriented Focuses on the processes that data undergoes from input until meaningful output is produced Tools used Flowcharts Pseudocode , structured English Algorithm written in near English statements for pseudocode
Image of page 17

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 18 Step 3: Code the Solution Translate the algorithm into source code Follow the rules of the programming language Integrated Development Environment (IDE) Visual Studio Tools for typing program statements, compiling, executing, and debugging applications
Image of page 18
Step 4: Implement the Code Figure 1-6 Execution steps for .NET Compile source code to check for rule violations C# → Source code is converted into Microsoft Intermediate Language (IL) Independent of CPU platform; not directly executable .NET’s Common Language Runtime ( CLR ) loads .NET classes A second compilation, called a just-in- time (JIT) compilation, is performed IL code is converted to the platform’s native code
Image of page 19

Subscribe to view the full document.

C# Programming: From Problem Analysis to Program Design 20 Test the program to ensure consistent results Plan your testing
Image of page 20
Image of page 21

{[ 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