Size: px
Start display at page:

Download ""

Transcription

1 1

2 Information system An information system is the combination of technology(computers) and people that enable an organization to collect data, store them, and transform them into information Data Data are raw facts that are collected and stored by the information system (numbers, letters, images, sound clips, or video clips) Information Is the output data processing (example the level of sugar in the blood) Computer Operations 1. Input data (reading data) 2. Store data in internal memory 3. Perform arithmetic operation on data 4. Compare two values and select one of two alternative actions 5. Repeat a group of actions any number of times 6. Output the results of processing Programming is a form of problem solving which aim is to develop a step by step process (logic) to solve the problem. The step by step logic is referred to as Algorithm Programming Languages like BASIC enable people to write programs in English-like languages that a BASIC interpreter or BASIC compiler can change into the machine language that the computer can understand 2

3 high-level languages Program Programming languages to write letters in English, but different rules change from one language to Other Sum = 0 Counter = 0 machine language which is entirely composed of zeroes and ones Interpreter When a program is interpreted, the high-level language statements are converted into equivalent machine-language statements one at a time as the program is executed. The nice thing about interpreting a program is that, if the program encounters a statement with an error, the interpretation process stops and an error message is displayed so the user can correct it. On the other hand, executing an interpreted program is slower than executing a compiled program since each statement has to be converted to binary each time it is encountered in the program even if it When a high-level language is compiled, the entire program is translated into machine language before any attempt to execute it. Compilation has an advantage over interpretation in that a compiled program will run faster than an interpreted program once all errors have been found and corrected. Note that, errors are more difficult to find during compilation than during interpretation Visual Basic has an advantage over other languages in that Visual Basic projects can be interpreted during the design and testing process, but can then be compiled into an executable program when all the errors have been removed. 3

4 Questions: Q1. Define an information system.? Q2. What is the difference between data and information? Q3. How you can convert data into information? Q4. Mention the main operations that all computers can perform. Q5. What is the difference between high level languages and machine language? Q6. What is the difference between compiler and interpreter? steps for problem solving as follows 1. Define the problem 2. Assemble known quantities and assign variable names 3. Discard unimportant data. 4. Establish relationships and express them as equations. 5. Determine the proper algorithm by arranging the equations in correct sequence. Example A school has 1000 students of whom 48 percent are boys. The school gave a party which 70 percent of the students attended. If 60 percent of those attending were boys, how many girls attended the party? Solution 1. The question is: How many girls attended the party? 2. Let x = the total number of students attending the party Let y = the number of boys attending the party Let z = the number of girls attending the party 3. The given fact that 48 percent of the students are boys has no effect on the problem and may be discarded. 4. The relationships stated are: a. 70 percent of the students attended ( x ) b. 60 percent of those attending were boys ( y ) c. This implies that the difference between x and y represents the number of girls attending (z). So, we express these relationships as the following equations: a. x = 1000 * 0.70 b. y = x * 0.60 c. z = x y 5. Since the variable x must be known to find the variable y and both x and y must be known in order to find z, the equations must be solved in the given order. 4

5 Flowcharting A flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem. Note that the 5 basic flowcharting symbols are 1 -Terminal block 2-Input / Output 3- Process block 4- Decision block 5- Flow lines. ADVANTAGES OF USING FLOWCHARTS 1. Communication 2. Effective analysis 3. Proper documentation 4. Efficient coding 5. Proper debugging 6. Efficient program maintenance LIMITATIONS OF USING FLOWCHARTS 1. Complex logic 2. Alterations and modifications 3. The essentials of what is done can easily be lost in the technical details of how it is done. 5

6 4. The difficulty of coping Pseudocode Pseudocode is statements written in abbreviated form to show the steps required to solv Pseudocode means "false code". That means that it is not the programming language e a specific problem Components 1. Words 2. Clauses 3. Statements 1-If hours worked is greater than 150 Then Calculate Overtime Pay = (Hours Worked 150) * 1.5 * (Pay Rate) Calculate Gross Pay = 150 * (Pay Rate) + Overtime Pay Else 2-Calculate Gross Pay = (Pay Rate) * (Hours Worked) Calculate TAX = 0.20 * (Gross Pay) Rules and Constraints 1. The data names of variables being used to solve the problem should describe what the variable represents 2. All statements should be written in a way that is easy to understand Program Logic Structures 1-Sequence In pseudo coding, statements are done in sequential fashion unless one of the statements contains an instruction that interrupts the normal sequential flow 2- Selection In this case an IF statement is presented There can be only two outcomes as a result of the IF statement being processed. One as a result of the tested condition being TRUE and the other as being FALSE. Therefore the IF- THEN-ELSE - The tested condition can be greater than(>), less than,(<) equal to(=), greater or equal to(>=), less than or equal to(<=),or not equal to. The result of testing the condition must be TRUE or FALSE For example M = 25 N = 12 If ( M >= N ) Then Statement 1 Else Statement 2 6

7 End If Statement 3 3-Iterations This statement implies that a certain activity or action will be performed repetitively a certain number of times or until a certain condition is met 1- Initialize the sum: Sum = 0 2- Initialize the number of terms N: N = 0 3- Increment the number of terms N 4- Add the new term to Sum: Sum = Sum + N 5- If (N = 100 ) Then Go to step 6 Else Perform steps 3 through step 4 until N = 100 Iterations End If 6- Stop Processing Advantages and disadvantages of Pseudocode Some of advantages of pseudocode are : 1. It is simple because it uses English-like statements. 2. No special symbols are used. 3. No specific syntax is used. 4. It is very easy to translate its statements to that for high level languages on a one-for-one basis The main disadvantages of pseudocode is that : 1. It can be quite lengthy for complex problems 7

8 Draw flowchart to represent the process of reading two numbers, dividing them, and then displaying the result Write a pseudocode to represent the process of reading two numbers, dividing them, and then displaying the result. 1. Input (Read) the first number number1. 2. Input (Read) the second number number2. 3. IF the value of number2 = zero Then Print Division is impossible because number2 is zero Go to step 4 ELSE result = number1 / number2 Print number1, number2, and result END IF 4. Stop processing. 8

9 Draw a flowchart to find the largest of three numbers A, B, and C. Write a pseudocode to find the largest of three numbers A, B, and C. 1. Input (Read) the values of three numbers A, B, C 2. IF the value of A > that of B Then Go to step 3 ELSE Go to step 4 END IF 3. IF the value of A > that of C Then Print The maximum value is that of A Go to step 5 ELSE Print The maximum value is that of C Go to step 5 END IF 4. IF the value of B > that of C Then Print The maximum value is that of B Go to step 5 ELSE Print The maximum value is that of C 5. Stop processing 9

10 END IF Draw a flowchart to find the sum of first 100 natural numbers. This means that we want to find sum where sum is given by: Sum = Write a pseudocode to find the sum of first 100 natural numbers. This means that we want to find sum where sum is given by: Sum = Initialize the Sum: Sum = 0 2. Initialize the term number N, which is the term itself: N = 0 3. Increment the term number: N = N Add the new term to Sum: Sum = Sum + N 5. IF N= 100 Then Go to step 6 Else Perform steps 3 through 4 until N is equal to 100 END IF 10

11 6. Print an output line showing the sum of the first 100 terms of the series 7. Stop processing Draw a flowchart to find the sum of the first 25 odd natural numbers. This means that we want to find sum where sum is given by: Sum = here we add 25 odd natural numbers 11

12 Write a pseudocode to find the sum of the first 25 odd natural numbers. This means that we want to find sum where sum is given by: Sum = here we add 25 odd natural numbers 1. Initialize the Sum: Sum = 0 2. Initialize the number of terms N, and the first term T: N = 0 T = 1 3. Add the new term to Sum: Sum = Sum + T 4. Increment the number of terms by 1, and the term value by 2: N = N + 1 T = T IF N = 25 Then Go to step 6 Else Perform steps 3 through 4 until T is less than 0.01 END IF 6. Print an output line showing the sum of the first 25 odd terms of the series 7. Stop processing T= T=1 12

13 Draw a flowchart to read the age of Hany and Hesham, then it prints the name of the elder Write a pseudocode to read the age of Hany and Hesham, then it prints the name of the elder 1- Input Hany is age and Hesham is age 2- If Hany is age Hesham is age Then Print Hany is elder Else If Hany is age = Hesham is age Then Print Both is equal Else Print Hesham is elder End If End If 3- Stop processing 13

14 Draw a flowchart that reads a temperature in Fahrenheit degrees and convert it into Celsius degrees, using the formula Write a pseudocode that reads a temperature in Fahrenheit degrees and convert it into Celsius degrees, using the formula 1- Initialize Celsius Degree C : C = 0 2- Input (Read) Fahrenheit Degree F 3- C = 5/9 * (F 32) 4- Print the value of C 14

15 5- Stop processing Draw a flowchart that reads the radius of a sphere r, then it calculates its volume V and surface area A using formulas If the read radius is negative, the flowchart should print a warning message then terminates Print the radius should be positive 15

16 Draw a flowchart that reads the radius of a sphere r, then it calculates its volume V and surface area A using formulas If the read radius is negative, the flowchart should print a warning message then terminates 1- Initialize Volume V : V = 0 2- Initialize Area A : A = 0 2- Input (Read) Radius r 3- If r < 0 Then Print the radius should be positive Else V = (4 / 3) * (22 / 7) * (r ^ 3) A = 4 * (22 / 7) * (r ^ 2) Print The Volume of Ball is V Print The Area of Ball is A End If 5- Stop Processing Object Oriented Programming (OOP) In the OOP model, programs are no longer procedural. They do not follow a sequential logic. You, as the programmer, do not take control and determine the sequence of execution. Instead, the user can press keys and click various buttons and boxes in a window. Each user action can cause an event to occur, which triggers a basic procedure (function or program) that you have written Object is something that exists. We deal with objects in our daily life. In real world objects can be parts of other objects. Property as a characteristic or attribute of an object. ObjectName.Property = Value MyPen.Color =Blue Method 16

17 as a predefined actions provided with an object. ObjectName.Method() Event as an action that may be caused by the user, such as a click, drag, or key press Classes a prototype or blueprint for an object that includes the specifications for its properties and methods. (Encapsulation) as an OOP feature that specifies that all methods and properties of a class be coded within the class. The class can hide or show the properties and methods as (Inheritance) is reusability, which is a big advantage of OOP over traditional programming. When you create a new class, you can then use that class in multiple projects Fill in the spaces using the following words : ( inheritance- object- event- property- method- class- Encapsulation) 1. Clicking the Mouse inside a Window is considered. 2. The width of the Window is considered.. 3. Pressing a key from the keyboard inside the Window is considered. 4. Properties that the son takes from his father is considered 5. Going to school is considered 6. Amount of water in a lake is considered 7. Circuit diagram of your cassette is considered.. 8. is considered hiding for information in a Class 5- methods 1- event 6- properties 2- properties 7- class 3- event 8- encapsulation 4- inheritance Put ( ) in front of the right sentence and ( ) in front of the wrong sentence: 1- The Class is constructed out of Object. (..) 2- The Computer is considered an Object that is consisting of many Objects. (..) 3- The color of a pen is a Method. (..) 4- Making cassette on is considered Event. (..) 5- The shape of an Object is determined by its properties. (..) 6- Object has Properties, Methods, and Events. (..) 7- Object is constructed out of a Class. (..) 17

18 8- Encapsulation is used to hide information of the Class. (..) 9- Derived Class inherits from the Base Class properties only. (..) 10- Encapsulation is used to protect the information of the Class.(..) Fill the following table Mnemonic object properties methods events class (oop) encapsulation inheritance Means is something that exists. We deal with objects in our daily life. In real world objects can be parts of other objects. as a characteristic or attribute of an object. as a predefined actions provided with an object. as an action that may be caused by the user, such as a click, drag, or key press a prototype or blueprint for an object that includes the specifications for its properties and methods In the OOP model, programs are no longer procedural. They do not follow a sequential logic. You, as the programmer, do not take control and determine the sequence of execution. Instead, the user can press keys and click various buttons and boxes in a window. Each user action can cause an event to occur, which triggers a basic procedure (function or program) that you have written as an OOP feature that specifies that all methods and properties of a class be coded within the class. The class can hide or show the properties and methods as is reusability, which is a big advantage of OOP over traditional programming. When you create a new class, you can then use that class in multiple projects 18

19 ( IDE )Integrated Development Environment The Visual Studio Environment is where you create and test your projects. The development environment is called the Integrated Development Environment (IDE). VB Projects Editor / Compiler / Debugger / Object browser / Help Open program VB.Net Start All Program Visual Basic2005 The New Project Dialog In the New Project dialog, select Visual Basic and Windows in the Project Types, then select Windows Application in the Templates box. In addition to that you have to give your project a name on this dialog box The IDE main window Toolbar: The Visual Studio toolbars contain buttons that are shortcuts for menu commands. The standard toolbar is shown Form Designer: The Form Designer is where you design a form that makes your user interface Solution Explorer : The Solution Explorer window holds the files names for the files included in your project and a list of the classes it references Properties window: We use the Properties Window to set the properties of objects in your Toolbox: The Toolbox contains the tools you use to place controls on a form : v.b.net 2005 Save all The Windows Form Control When you create a Windows Application new project, the IDE will automatically create a "Windows Form" for you as you have seen in the previous chapter. Practically, you will use this form to hold the other controls Button It was mentioned in the previous chapter that the Button control's primary function is to react to a click of the user and perform a task associated with that button. In other words, it executes a preprogrammed function when the event of clicking The button happens 19 F5 File

20 ( Hint) Gets or sets the image that is displayed on a Button control Gets or sets the alignment of the image on the Button control Gets or sets the alignment of the text on the Button control Gets or sets a value indicating whether the control is displayed ( Property) Image ImageAlign TextAlign Visible Visible Button1.Visible=False Button1.Visible=True True True Button Button1.Visible=False. Button1. False Button1.Enabled=False Button1.Enabled=True Label The Label control is a rectangular area that can be filled with text. The following Table provides a list of commonly used properties for : :. :Visible False :Enabled 20

21 Empty String("") We set this Label's Text property equal to the empty string at design time so that when the application starts running, Events As we discussed before, when the user clicks the mouse button, Click event is generated. You can write a code that is executed when the event of clicking the button is detected. This code is called event handler Intell Sense IntelliSense list of the controls by using the "Me" keyword. When you type "Me" followed by a period, a list pops up showing the objects, properties, and methods for the form. As you start to type the control name, the selected position in the list changes until the unique item appears, then as soon as the correct name appears, type the next character(space, period, or Enter key) Textbox The TextBox is a data entry control. It provides an area for the user to type while the program executes. This information can then be used by the application's code as it executes. 21

22 "CharacterCasting" property will automatically change whatever the user types to either uppercase or lowercase. "MaxLength" property controls the maximum number of characters the user can type. "ReadOnly" property prevents the user from typing into the TextBox, when it is set to True "PasswordChar" property lets you set a character "TextLength" property is used during run time to see how many characters exist in the TextBox MsgBox MsgBox statement stands for Message Box statement. It is an alternative way to the label control for displaying information to the user Button1.Text = "Cairo" Button1.ForeColor = Color. Red Button1.BackColor = Color. Yellow MsgBox("Egypt") Label5. Text Align=Center Button1.Visible=True Button1.Visible=False Button1.Enabled=True Button1.Enabled=False Capital TextBox1.Text=Me. TextBox2.Text.ToUpper( ) Small TextBox2.Text=Me. TextBox1.Text.ToLower( ) / 22

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 1 An Introduction to Visual Basic 2005 Objectives After studying this chapter, you should be able to: Explain the history of programming languages

More information

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS INTRODUCTION TO PROBLEM SOLVING Introduction to Problem Solving Understanding problems Data processing Writing an algorithm CONTINUE.. Tool

More information

SNS COLLEGE OF ENGINEERING

SNS COLLEGE OF ENGINEERING SNS COLLEGE OF ENGINEERING DEPARTMENT OF CSE Presented By Thillaiarasu.N SCRAMBLE 2 Solution 3 What is Pseudocode? 4 Consists of: Short Readable Formally styled English language Used for: Explaining the

More information

Chapter 1. Introduction to Programming and Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Chapter 1. Introduction to Programming and Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 1 Introduction to Programming and Visual Basic Addison Wesley is an imprint of 2011 Pearson Addison-Wesley. All rights reserved. Section 1.1 COMPUTER SYSTEMS: HARDWARE AND SOFTWARE Computer systems

More information

You will have mastered the material in this chapter when you can:

You will have mastered the material in this chapter when you can: CHAPTER 6 Loop Structures OBJECTIVES You will have mastered the material in this chapter when you can: Add a MenuStrip object Use the InputBox function Display data using the ListBox object Understand

More information

SNS COLLEGE OF ENGINEERING,

SNS COLLEGE OF ENGINEERING, SNS COLLEGE OF ENGINEERING, COIMBATORE Department of Computer Science and Engineering QUESTION BANK(PART A) GE8151 - PROBLEM SOLVING AND PYTHON PROGRAMMING TWO MARKS UNIT-I 1. What is computer? Computers

More information

First Visual Basic Lab Paycheck-V1.0

First Visual Basic Lab Paycheck-V1.0 VISUAL BASIC LAB ASSIGNMENT #1 First Visual Basic Lab Paycheck-V1.0 Copyright 2013 Dan McElroy Paycheck-V1.0 The purpose of this lab assignment is to enter a Visual Basic project into Visual Studio and

More information

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET VB.NET Module 1: Getting Started This module introduces Visual Basic.NET and explains how it fits into the.net platform. It explains how to use the programming tools in Microsoft Visual Studio.NET and

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

Unit-II Programming and Problem Solving (BE1/4 CSE-2)

Unit-II Programming and Problem Solving (BE1/4 CSE-2) Unit-II Programming and Problem Solving (BE1/4 CSE-2) Problem Solving: Algorithm: It is a part of the plan for the computer program. An algorithm is an effective procedure for solving a problem in a finite

More information

Job Ready Assessment Blueprint. Computer Programming. Test Code: 3023 / Version: 01

Job Ready Assessment Blueprint. Computer Programming. Test Code: 3023 / Version: 01 Job Ready Assessment Blueprint Computer Programming Test Code: 3023 / Version: 01 Measuring What Matters Specific Competencies and Skills Tested in this Assessment: Analyze Programming Problems and Flowchart

More information

Chapter1 Overview of computers

Chapter1 Overview of computers 1 Chapter1 Overview of computers 1. What is a computer? 2. Which is the earliest computing machine? 3. Who invented the pascaline? 4. What is Charles babbage known as? 5. What is the machine proposed by

More information

CSC 121 Spring 2017 Howard Rosenthal

CSC 121 Spring 2017 Howard Rosenthal CSC 121 Spring 2017 Howard Rosenthal Agenda To be able to define computer program, algorithm, and highlevel programming language. To be able to list the basic stages involved in writing a computer program.

More information

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation.

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation. UNIT III PROBLEM SOLVING AND OFFICE AUTOMATION Planning the Computer Program Purpose Algorithm Flow Charts Pseudo code -Application Software Packages- Introduction to Office Packages (not detailed commands

More information

Visual Basic Course Pack

Visual Basic Course Pack Santa Monica College Computer Science 3 Visual Basic Course Pack Introduction VB.NET, short for Visual Basic.NET is a language that was first introduced by Microsoft in 1987. It has gone through many changes

More information

Computer Fundamentals

Computer Fundamentals Computer Fundamentals 1 Draw the block diagram of computer architecture and explain each block. Computer is made up of mainly four components, 1) Central processing unit (CPU) 2) Input section 3) Output

More information

Using Visual Basic Studio 2008

Using Visual Basic Studio 2008 Using Visual Basic Studio 2008 Recall that object-oriented programming language is a programming language that allows the programmer to use objects to accomplish a program s goal. An object is anything

More information

An Introduction to Python (TEJ3M & TEJ4M)

An Introduction to Python (TEJ3M & TEJ4M) An Introduction to Python (TEJ3M & TEJ4M) What is a Programming Language? A high-level language is a programming language that enables a programmer to write programs that are more or less independent of

More information

Visual Basic Program Coding STEP 2

Visual Basic Program Coding STEP 2 Visual Basic Program Coding 129 STEP 2 Click the Start Debugging button on the Standard toolbar. The program is compiled and saved, and then is run on the computer. When the program runs, the Hotel Room

More information

Visual C# Program: Temperature Conversion Program

Visual C# Program: Temperature Conversion Program C h a p t e r 4B Addendum Visual C# Program: Temperature Conversion Program In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Writing a

More information

Students received individual feedback throughout year on assignments.

Students received individual feedback throughout year on assignments. ACS108 No exam. Students received individual feedback throughout year on assignments. ACS123 In general, during ACS123 exam session, students have shown satisfactory performance, clear understanding of

More information

Introduction to C Final Review Chapters 1-6 & 13

Introduction to C Final Review Chapters 1-6 & 13 Introduction to C Final Review Chapters 1-6 & 13 Variables (Lecture Notes 2) Identifiers You must always define an identifier for a variable Declare and define variables before they are called in an expression

More information

FLOW CHART AND PSEUDO CODE

FLOW CHART AND PSEUDO CODE FLOW CHART AND PSEUDO CODE Flowchart A Flowchart is a pictorial representation of an algorithm. The First flowchart is made by John Von Newman in 1945. It is a symbolic diagram of operation sequence, dataflow,

More information

Chapter 5 Conditional and Iterative Statements. Statement are the instructions given to the computer to perform any kind of action.

Chapter 5 Conditional and Iterative Statements. Statement are the instructions given to the computer to perform any kind of action. Chapter 5 Conditional and Iterative Statements Statement Statement are the instructions given to the computer to perform any kind of action. Types of Statement 1. Empty Statement The which does nothing.

More information

ENT 189: COMPUTER PROGRAMMING. H/P: Home page:

ENT 189: COMPUTER PROGRAMMING.   H/P: Home page: ENT 189: COMPUTER PROGRAMMING Dr. PAULRAJ M P, Associate Professor, School of Mechatronic Engineering, #42- Level 2, Ulu Pauh New Campus 02600-Arau. PERLIS Email: paul@unimap.edu.my H/P: 017 5103757 Home

More information

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and VBA AND MACROS VBA is a major division of the stand-alone Visual Basic programming language. It is integrated into Microsoft Office applications. It is the macro language of Microsoft Office Suite. Previously

More information

I101/B100 Problem Solving with Computers

I101/B100 Problem Solving with Computers I101/B100 Problem Solving with Computers By: Dr. Hossein Hakimzadeh Computer Science and Informatics IU South Bend 1 What is Visual Basic.Net Visual Basic.Net is the latest reincarnation of Basic language.

More information

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University ITC213: STRUCTURED PROGRAMMING Bhaskar Shrestha National College of Computer Studies Tribhuvan University Lecture 02: Algorithms Readings: Not Covered in Textbook Problem Solving Process System Design:

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 18 Switch Statement (Contd.) And Introduction to

More information

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us?

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us? 1 CS 105 Lab 3 The purpose of this lab is to practice the techniques of making choices and looping. Before you begin, please be sure that you understand the following concepts that we went over in class:

More information

Overview About KBasic

Overview About KBasic Overview About KBasic The following chapter has been used from Wikipedia entry about BASIC and is licensed under the GNU Free Documentation License. Table of Contents Object-Oriented...2 Event-Driven...2

More information

Unit II. (i) Computer Programming Languages

Unit II. (i) Computer Programming Languages Unit II. (i) Computer Programming Languages Need of a computer programming language: A programming language is an artificial language designed to communicate instructions to a computer. Thousands of different

More information

Making Tables and Figures

Making Tables and Figures Making Tables and Figures Don Quick Colorado State University Tables and figures are used in most fields of study to provide a visual presentation of important information to the reader. They are used

More information

Contents. More Controls 51. Visual Basic 1. Introduction to. xiii. Modify the Project 30. Print the Project Documentation 35

Contents. More Controls 51. Visual Basic 1. Introduction to. xiii. Modify the Project 30. Print the Project Documentation 35 Contents Modify the Project 30 Introduction to Print the Project Documentation 35 Visual Basic 1 Sample Printout 36 Writing Windows Applications The Form Image 36 The Code 37 with Visual Basic 2 The Form

More information

Departme and. Computer. CS Intro to. Science with. Objectives: The main. for a problem. of Programming. Syntax Set of rules Similar to.

Departme and. Computer. CS Intro to. Science with. Objectives: The main. for a problem. of Programming. Syntax Set of rules Similar to. _ Unit 2: Visual Basic.NET, pages 1 of 13 Departme ent of Computer and Mathematical Sciences CS 1408 Intro to Computer Science with Visual Basic.NET 4 Lab 4: Getting Started with Visual Basic.NET Programming

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100274DEC06200274 Paper Code : MCA-207 Subject: Front End Design Tools Time: 3 Hours

More information

Basics of Spreadsheet

Basics of Spreadsheet 106 :: Data Entry Operations 6 Basics of Spreadsheet 6.1 INTRODUCTION A spreadsheet is a large sheet having data and information arranged in rows and columns. As you know, Excel is one of the most widely

More information

Skill Area 306: Develop and Implement Computer Program

Skill Area 306: Develop and Implement Computer Program Add your company slogan Skill Area 306: Develop and Implement Computer Program Computer Programming (YPG) LOGO Skill Area 306.2: Produce Structured Program 306.2.1 Write Algorithm 306.2.2 Apply appropriate

More information

HOUR 4 Understanding Events

HOUR 4 Understanding Events HOUR 4 Understanding Events It s fairly easy to produce an attractive interface for an application using Visual Basic.NET s integrated design tools. You can create beautiful forms that have buttons to

More information

CIS 3260 Intro. to Programming with C#

CIS 3260 Intro. to Programming with C# Running Your First Program in Visual C# 2008 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Run Visual Studio Start a New Project Select File/New/Project Visual C# and Windows must

More information

PROBLEM SOLVING AND PYTHON PROGRAMMING

PROBLEM SOLVING AND PYTHON PROGRAMMING ALGORITHM UNIT-1 It is defined as a sequence of instructions that describe a method for solving a problem. In other words it is a step by step procedure for solving a problem. Properties of Algorithms

More information

Programming Logic Beginning

Programming Logic Beginning Programming Logic Beginning 152-101 Designing Programs and Applications Quick Links & Text References Program Design Pages 23 27 Algorithms Pages 25 26 Levels of Design Pages IOPs Pages User Interface

More information

Pseudo Code and Flow Charts. Chapter 1 Lesson 2

Pseudo Code and Flow Charts. Chapter 1 Lesson 2 Pseudo Code and Flow Charts Chapter 1 Lesson 2 Pseudocode Using Pseudocode Statements and Flowchart Symbols English-like representation of the logical steps it takes to solve a problem Flowchart Pictorial

More information

Microsoft Visual Basic 2005 CHAPTER 6. Loop Structures

Microsoft Visual Basic 2005 CHAPTER 6. Loop Structures Microsoft Visual Basic 2005 CHAPTER 6 Loop Structures Objectives Add a MenuStrip object Use the InputBox function Display data using the ListBox object Understand the use of counters and accumulators Understand

More information

LESSON B. The Toolbox Window

LESSON B. The Toolbox Window The Toolbox Window After studying Lesson B, you should be able to: Add a control to a form Set the properties of a label, picture box, and button control Select multiple controls Center controls on the

More information

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2) Skill Area 336 Explain Essential Programming Concept Programming Language 2 (PL2) 336.2-Apply Basic Program Development Techniques 336.2.1 Identify language components for program development 336.2.2 Use

More information

Pseudocode. ARITHMETIC OPERATORS: In pseudocode arithmetic operators are used to perform arithmetic operations. These operators are listed below:

Pseudocode. ARITHMETIC OPERATORS: In pseudocode arithmetic operators are used to perform arithmetic operations. These operators are listed below: Pseudocode There are 3 programming/pseudocode constructs: 1. Sequence: It refers that instructions should be executed one after another. 2. Selection: This construct is used to make a decision in choosing

More information

Microsoft Excel 2010 Handout

Microsoft Excel 2010 Handout Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track

More information

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net UNIT 1 Introduction to Microsoft.NET framework and Basics of VB.Net 1 SYLLABUS 1.1 Overview of Microsoft.NET Framework 1.2 The.NET Framework components 1.3 The Common Language Runtime (CLR) Environment

More information

19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd

19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd 19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd Will you walk a little faster? said a whiting to a snail, There s a porpoise close behind us, and he s treading

More information

Condition Controlled Loops. Introduction to Programming - Python

Condition Controlled Loops. Introduction to Programming - Python + Condition Controlled Loops Introduction to Programming - Python + Repetition Structures n Programmers commonly find that they need to write code that performs the same task over and over again + Example:

More information

Unit E Step-by-Step: Programming with Python

Unit E Step-by-Step: Programming with Python Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator

More information

Introduction to Computers and Java

Introduction to Computers and Java Introduction to Computers and Java Chapter 1 Chapter 1 1 Objectives overview computer hardware and software introduce program design and object-oriented programming overview the Java programming language

More information

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java Chapter 3 Syntax, Errors, and Debugging Objectives Construct and use numeric and string literals. Name and use variables and constants. Create arithmetic expressions. Understand the precedence of different

More information

PSEUDOCODE AND FLOWCHARTS. Introduction to Programming

PSEUDOCODE AND FLOWCHARTS. Introduction to Programming PSEUDOCODE AND FLOWCHARTS Introduction to Programming What s Pseudocode? Artificial and Informal language Helps programmers to plan an algorithm Similar to everyday English Not an actual programming language

More information

You can record macros to automate tedious

You can record macros to automate tedious Introduction to Macros You can record macros to automate tedious and repetitive tasks in Excel without writing programming code directly. Macros are efficiency tools that enable you to perform repetitive

More information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 374 C# and Applications/ IT695 C# Data Structures IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation

More information

FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III. 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION

FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III. 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION Planning the Computer Program Purpose Algorithm Flow Charts Pseudocode -Application Software Packages-

More information

Tutorial 03 understanding controls : buttons, text boxes

Tutorial 03 understanding controls : buttons, text boxes Learning VB.Net Tutorial 03 understanding controls : buttons, text boxes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple

More information

Lab Cover Page. Lab Date and Time: Teaching Assistant to whom you are submitting

Lab Cover Page. Lab Date and Time: Teaching Assistant to whom you are submitting Student Information First Name School of Computer Science Faculty of Engineering and Computer Science Last Name Student ID Number Lab Cover Page Please complete all fields: Course Name: Structure and Application

More information

Control Statements: Part 1

Control Statements: Part 1 4 Let s all move one place on. Lewis Carroll Control Statements: Part 1 The wheel is come full circle. William Shakespeare How many apples fell on Newton s head before he took the hint! Robert Frost All

More information

Fundamentals of Programming (Python) Getting Started with Programming

Fundamentals of Programming (Python) Getting Started with Programming Fundamentals of Programming (Python) Getting Started with Programming Ali Taheri Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

Subject to Change Drawing Application 1 Introducing Computers, the Internet and C#

Subject to Change Drawing Application 1 Introducing Computers, the Internet and C# CO N T E N T S Subject to Change 08-01-2003 Preface Before You Begin Brief Table of Contents i iv vii 1 Drawing Application 1 Introducing Computers, the Internet and C# 1.1 What Is a Computer? 1 1.2 Computer

More information

Programming for Engineers Iteration

Programming for Engineers Iteration Programming for Engineers Iteration ICEN 200 Spring 2018 Prof. Dola Saha 1 Data type conversions Grade average example,-./0 class average = 23450-67 893/0298 Grade and number of students can be integers

More information

Introduction to Java Applications

Introduction to Java Applications 2 Introduction to Java Applications OBJECTIVES In this chapter you will learn: To write simple Java applications. To use input and output statements. Java s primitive types. Basic memory concepts. To use

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 4 Making Decisions in a Program Objectives After studying this chapter, you should be able to: Include the selection structure in pseudocode

More information

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course Module 1: Getting Started This module introduces Visual Basic.NET and explains how it fits into the.net platform. It explains how to use the programming tools in Microsoft Visual Studio.NET and provides

More information

1) Which of the following is an example of a programming language? 1) A) Microsoft Word B) English C) HTML D) Java

1) Which of the following is an example of a programming language? 1) A) Microsoft Word B) English C) HTML D) Java FALL 07-08 CIS105(CP105)/CE205 MIDTERM-2 EXAM /FACULTY OF ECON. &ADMIN. SCIENCES OF EUL Student Registration No: Instructor: Prof.Dr.Hüseyin Oğuz Student Name-Surname: Dept. of Computer Information Systems

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Formatting a spreadsheet means changing the way it looks to make it neater and more attractive. Formatting changes can include modifying number styles, text size and colours. Many

More information

Chapter 3 Problem Solving and the Computer

Chapter 3 Problem Solving and the Computer Chapter 3 Problem Solving and the Computer An algorithm is a step-by-step operations that the CPU must execute in order to solve a problem, or to perform that task. A program is the specification of an

More information

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems.

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. Plan for the rest of the semester: Programming We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. We saw earlier that computers

More information

Dive Into Visual C# 2008 Express

Dive Into Visual C# 2008 Express 1 2 2 Dive Into Visual C# 2008 Express OBJECTIVES In this chapter you will learn: The basics of the Visual Studio Integrated Development Environment (IDE) that assists you in writing, running and debugging

More information

Advanced Financial Modeling Macros. EduPristine

Advanced Financial Modeling Macros. EduPristine Advanced Financial Modeling Macros EduPristine www.edupristine.com/ca Agenda Introduction to Macros & Advanced Application Building in Excel Introduction and context Key Concepts in Macros Macros as recorded

More information

Lesson 3: Basic Programming Concepts

Lesson 3: Basic Programming Concepts 3 ICT Gaming Essentials Lesson 3: Basic Programming Concepts LESSON SKILLS After completing this lesson, you will be able to: Explain the types and uses of variables and operators in game programming.

More information

3 The L oop Control Structure

3 The L oop Control Structure 3 The L oop Control Structure Loops The while Loop Tips and Traps More Operators The for Loop Nesting of Loops Multiple Initialisations in the for Loop The Odd Loop The break Statement The continue Statement

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 15 Branching : IF ELSE Statement We are looking

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

Sri Vidya College of Engineering & Technology

Sri Vidya College of Engineering & Technology UNIT I INTRODUCTION TO OOP AND FUNDAMENTALS OF JAVA 1. Define OOP. Part A Object-Oriented Programming (OOP) is a methodology or paradigm to design a program using classes and objects. It simplifies the

More information

WYSE Academic Challenge 2017 Software Changes

WYSE Academic Challenge 2017 Software Changes WYSE Academic Challenge 2017 Software Changes This document outlines the means by which site coordinators can gain access to the WYSE Academic Challenge 2017 online software. In the past, the online software

More information

2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET

2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET 2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET Introduction Elements of this syllabus are subject to change. This five-day instructor-led course provides students with the knowledge

More information

Outline. Debugging. In Class Exercise Solution. Review If Else If. Immediate Program Errors. Function Test Example

Outline. Debugging. In Class Exercise Solution. Review If Else If. Immediate Program Errors. Function Test Example Debugging Larry Caretto Mechanical Engineering 209 Computer Programming for Mechanical Engineers February 16, 2017 Outline Review choice statements Finding and correcting program errors Debugging toolbar

More information

EPANET Tutorial. Project Setup Our first task is to create a new project in EPANET and make sure that certain default options are selected.

EPANET Tutorial. Project Setup Our first task is to create a new project in EPANET and make sure that certain default options are selected. EPANET Tutorial Example Network In this tutorial we will analyze the simple distribution network shown below. It consists of a source reservoir (e.g., a treatment plant clearwell) from which water is pumped

More information

Microsoft Office 2003 Beginning Microsoft Word

Microsoft Office 2003 Beginning Microsoft Word Microsoft Office 2003 Beginning Microsoft Word Objective 1: Become acquainted with the Microsoft Word environment. Toolbars Standard Toolbar Formatting Toolbar Toolbars provide easy access to commonly

More information

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide VBA Visual Basic for Applications Learner Guide 1 Table of Contents SECTION 1 WORKING WITH MACROS...5 WORKING WITH MACROS...6 About Excel macros...6 Opening Excel (using Windows 7 or 10)...6 Recognizing

More information

Visual Basic 2008 Anne Boehm

Visual Basic 2008 Anne Boehm TRAINING & REFERENCE murach s Visual Basic 2008 Anne Boehm (Chapter 3) Thanks for downloading this chapter from Murach s Visual Basic 2008. We hope it will show you how easy it is to learn from any Murach

More information

ICT GRAND WORKSHEET- CLASS-5. Section A. 2 nd Term Chapters 5, 6, 7, 8 and 9. Fill in the blanks with the correct answers.

ICT GRAND WORKSHEET- CLASS-5. Section A. 2 nd Term Chapters 5, 6, 7, 8 and 9. Fill in the blanks with the correct answers. ICT GRAND WORKSHEET- CLASS-5 2 nd Term - 2014-15 Chapters 5, 6, 7, 8 and 9. Section A Fill in the blanks with the correct answers. 1. Left is the alignment where the text is aligned from the left edge

More information

University of Massachusetts Lowell

University of Massachusetts Lowell University of Massachusetts Lowell 91.301: Organization of Programming Languages Fall 2002 Quiz 1 Solutions to Sample Problems 2 91.301 Problem 1 What will Scheme print in response to the following statements?

More information

Lab 4: Introduction to Programming

Lab 4: Introduction to Programming _ Unit 2: Programming in C++, pages 1 of 9 Department of Computer and Mathematical Sciences CS 1410 Intro to Computer Science with C++ 4 Lab 4: Introduction to Programming Objectives: The main objective

More information

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java Chapter 1 Introduction to Computers and Java Objects Background information» important regardless of programming language Introduction to Java Chapter 1 Java: an Introduction to Computer Science & Programming

More information

Measures of Central Tendency. A measure of central tendency is a value used to represent the typical or average value in a data set.

Measures of Central Tendency. A measure of central tendency is a value used to represent the typical or average value in a data set. Measures of Central Tendency A measure of central tendency is a value used to represent the typical or average value in a data set. The Mean the sum of all data values divided by the number of values in

More information

A Freshman C++ Programming Course

A Freshman C++ Programming Course A Freshman C++ Programming Course Dr. Ali H. Al-Saedi Al-Mustansiria University, Baghdad, Iraq January 2, 2018 1 Number Systems and Base Conversions Before studying any programming languages, students

More information

Programming Logic - Beginning

Programming Logic - Beginning Instructor s Programming Logic - Beginning Designing Programs and Applications Programming Logic - Beginning 152-101 Designing Programs and Applications Quick Links & Text References Program Design Pages

More information

Module 1: Introduction to Computers, Programs, and Java

Module 1: Introduction to Computers, Programs, and Java Module 1: Introduction to Computers, Programs, and Java Module 1: Introduction to Java page 1 Objectives To review Program Design and Problem-Solving Techniques To describe the relationship between Java

More information

A triangle that has three acute angles Example:

A triangle that has three acute angles Example: 1. acute angle : An angle that measures less than a right angle (90 ). 2. acute triangle : A triangle that has three acute angles 3. angle : A figure formed by two rays that meet at a common endpoint 4.

More information

ECE 202 LAB 3 ADVANCED MATLAB

ECE 202 LAB 3 ADVANCED MATLAB Version 1.2 1 of 13 BEFORE YOU BEGIN PREREQUISITE LABS ECE 201 Labs EXPECTED KNOWLEDGE ECE 202 LAB 3 ADVANCED MATLAB Understanding of the Laplace transform and transfer functions EQUIPMENT Intel PC with

More information

Essay & Assignment Preparation using MindGenius

Essay & Assignment Preparation using MindGenius Essay & Assignment Preparation using MindGenius This workshop is aimed at those of you who struggle gathering and sorting information when beginning to write an essay. Using MindGenius you can plan essays

More information

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2-1 Parts of a C++ Program Parts of a C++ Program // sample C++ program

More information

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER?

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER? 1 A Quick Tour WHAT S IN THIS CHAPTER? Installing and getting started with Visual Studio 2012 Creating and running your fi rst application Debugging and deploying an application Ever since software has

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 10 Creating Classes and Objects Objectives After studying this chapter, you should be able to: Define a class Instantiate an object from a class

More information