Chapter 7. Lists, Loops, and Printing The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Size: px
Start display at page:

Download "Chapter 7. Lists, Loops, and Printing The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill"

Transcription

1 Chapter 7 Lists, Loops, and Printing McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved.

2 Chapter Objectives - 1 Create and use list boxes and combo boxes Differentiate among the available types of combo boxes Enter items into list boxes using the Items collection in the Properties window Add and remove items in a list at run time Determine which item in a list is selected McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-2

3 Chapter Objectives - 2 Use the Items.Count property to determine the number of items in a list Display a selected item from a list Use do, while, and for loops to execute a series of statements Skip to the next iteration of a loop by using the continue statement Send information to the printer or the Print Preview window using the PrintDocument class McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-3

4 List Boxes and Combo Boxes - 1 List boxes and combo boxes Have most of the same properties and operate in a similar fashion One exception is that a combo box control has a DropDownStyle property Determines whether list box has a text box for user entry and if the list will drop down Provide the user with a list of items from which to select McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-4

5 List Boxes and Combo Boxes - 2 Various styles, choose according to space available and how the box operates Simple list box or drop-down list ComboBox DropDownStyle = DropDownList Type a new entry to the list Drop-down combo box DropDownStyle = Drop-Down Simple combo box DropDownStyle = Simple Combo boxes have a Text property Set or remove at design time List boxes have a Text property Access it only at run time McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-5

6 List Boxes and Combo Boxes - 3 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-6

7 The Items Collection - 1 The list of items in a list box or combo box Collections are objects that have properties and methods that allow Adding items Removing items Referring to individual elements Counting items Clearing the collection McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-7

8 The Items Collection - 2 Can refer to the individual items in a collection by an index Zero based For a collection of ten items, the indexes range from 0 to 9 To refer to the first item in the Items collection use Items[0] Notice the square brackets McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-8

9 Filling a List Several methods to fill the Items collection of a list box or combo box Fill the list at design time if the list is known and the list never changes Define the Items collection in the Properties window Fill the list during program execution Items.Add or Items.Insert methods McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-9

10 Using the Properties Window - 1 Define the Items collection at design time Select the control Scroll the Properties window to the Items property Click the ellipsis button to open the String Collection Editor Type the list items Click OK If needed, open the editor again to modify the list McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-10

11 Using the Properties Window - 2 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-11

12 Using the Items.Add Method Items that can be added to a list at run time include: Variables, constants, contents of the text box at the top of a combo box, or the text property of another control Alter placement of a new item by setting the control s Sorted property to true McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-12

13 General Form The Items.Add Method Object.Items.Add(ItemValue); Examples schoolslistbox.items.add("harvard"); schoolslistbox.items.add("stanford"); schoolslistbox.items.add(schoolstextbox.text); majorscombobox.items.add(majorscombobox.text); majorscombobox.items.add(majorstring); Use the Items.Add method to add a value entered in the text box portion of a combo box (not automatically added) coffeecombobox.items.add(coffeecombobox.text); Add contents of a text box to a list box schoolslistbox.items.add(schooltextbox.text); McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-13

14 Using the Items.Insert Method Choose location for new item added to list Items.Insert method Specify index position for new item An existing position or end of list Index position is zero based First position, use index position = 0 Inserting an item beyond end of list throws an exception Do not set list control s Sorted property to true McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-14

15 The Items.Insert Method General Form Object.Items.Insert(IndexPosition, ItemValue); Examples schoolslistbox.items.insert(0, "Harvard"); majorscombobox.items.insert(1, majorscombobox.text); McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-15

16 The SelectedIndex Property Index number of the currently selected item is stored in the SelectedIndex property If no list item is selected, the SelectedIndex property is negative 1 ( 1) Set the SelectedIndex property in code to select an item in the list or deselect all items // Select the fourth item in list. coffeetypeslistbox.selectedindex = 3; // Deselect all items in list. coffeetypeslistbox.selectedindex = -1; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-16

17 The Items.Count Property Use to determine the number of items in the list totalitemsinteger = itemslistbox.items.count; MessageBox.Show( The number of items in the list is + itemslistbox.items.count.tostring()); Items.Count is always one more than the highest possible SelectedIndex because indexes begin with zero Example: For a list of five items Items.Count = 5 Highest index = 4 Possible values for SelectedIndex = 0, 1, 2, 3, 4 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-17

18 Referencing the Items Collection - 1 Use the index of the item to reference a specific item in an Items collection Specify which element to select by including an index Use square brackets to reference the index position of a list Index of first list element is zero Highest index is Items.Count - 1 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-18

19 Referencing the Items Collection - 2 Combine the Items property and the SelectedIndex property to refer to a selected element of a list selectedflavorstring = flavorlistbox.items[flavorlistbox.selectedindex].tostring(); Retrieve the selected list item by referring to the Text property of the control selectedmajorlabel.text = majorscombobox.text; Assigning a value to an item replaces previous contents of that position schoolslistbox.items[0] = My School ; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-19

20 Removing an Item from a List Items.RemoveAt method Removes an item by index First list element is 0, last element is Items.Count -1 An invalid index will cause an IndexOutOfRange exception nameslistbox.items.removeat[0]; schoolscombobox.items.removeat[indexinteger]; coffeecombobox.items.removeat(coffeecombobox.selectedindex); Items.Remove method Looks for the specified string, removes item if string found No exception is generated if the item is not found nameslistbox.items.remove[ My School ]; schoolscombobox.items.remove(schooltextbox.text); coffeecombobox.items.remove(coffeecombobox.text); McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-20

21 Clearing a List Items.Clear method Empty a combo box or list box Clear all items from a list // Confirm clearing the majors list. DialogResult responsedialogresult; responsedialogresult = MessageBox.Show("Clear the majors list?", "Clear Majors List", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (responsedialogresult == DialogResult.Yes) { majorscombobox.items.clear(); } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-21

22 List Box and Combo Box Events SelectedIndexChanged event Occurs when the user makes a selection from a list TextChanged event Each keystroke generates a TextChanged event Available in combo boxes not list boxes Enter event Occurs when a control receives the focus Use to make existing text appear selected Leave event Fires when a control loses focus Often used for validating input data McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-22

23 The while and do/while Loops - 1 Looping Process of repeating a series of instructions Loop Group of repeated instructions Iteration Single execution of the statement(s) in a loop while or do/while loop Terminates based on a condition specified McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-23

24 The while and do/while Loops - 2 Execution of statements in the loop continue while a condition is true Used when the exact number of iterations needed is not known ahead of time while loop Tests for completion at the top of a loop Also called a pretest or entry test Statements in loop never execute if terminating condition is true first time it is tested When statements inside loop do not execute, control passes to statement following end of loop totalinteger = 0; while (totalinteger!= 0) { // Statements in loop (will never be done). } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-24

25 The while and do/while Loops - 3 do/while loop Tests for completion at bottom of loop Also called a posttest or exit test Statements inside loop will always execute at least once McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-25

26 The bool Data Type Revisited bool variables can be very useful for setting and testing loop conditions bool variables are always in one of two states true or false Often referred to as switches or flags To use a bool variable for loop control Declare the variable and set its initial value When a particular situation occurs, set the variable to true Make the loop condition test for true (continue executing the loop as long as the condition is not true) bool itemfoundboolean = false; while (! itemfoundboolean) // Loop when condition is false (not true). { // Statement(s) in loop. // Must include a statement that sets itemfoundboolean to true. } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-26

27 for Loops - 1 Used to repeat statements in a loop a specific number of times Three parts of a for loop (statement), each separated by a semicolon Initialization More than one initialization action can be used, separate each with commas Condition Action to occur after each iteration More than one action to execute at end of each iteration of the loop can be written Uses a numeric counter variable, the loop index, which is tested to determine the number of times the statements inside the loop will execute McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-27

28 for Loops - 2 Counter-controlled loop normally has three elements Initialize the counter The loop index, a properly initialized numeric variable Test the counter to determine when to terminate the loop Condition tests the value of the loop index variable Increment the counter Add to or subtract from the loop index variable, the loop index is incremented after each iteration All statements between a pair of braces following a for statement are the body of the loop Statements are executed a specified number of times McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-28

29 The for Statement Examples for (int indexinteger = 2; indexinteger <= 100; indexinteger += 2) for (countinteger = startinteger; countinteger < endinteger; countinteger += incrementinteger) for (int countinteger = 0; countinteger <= coffeetypecombobox.items.count 1; countinteger++) for (ratedecimal = 0.05M; ratedecimal < 0.25M; ratedecimal += 0.05M) for (int countdowninteger = 10; countdowninteger > 0; countdowninteger ) Program checks condition after comparison is done If condition is true, loop continues execution If condition is false, loop is exited Control passes to statement following closing brace McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-29

30 Negative Increment or Counting Backward Increment or decrement (reduce by one) the counter variable To decrement a counter variable write the condition to test for the lower bound Loop continues as long as index variable is greater than the test value //Count down. for (int countinteger = 10; countinteger > 0; countinteger--) { //Statements in the body of the loop. } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-30

31 Conditions Satisfied before Entry Final value reached before entry into loop Statements in body of loop never executed // An unexecutable loop. int finalinteger = 5; for (int indexinteger = 6; indexinteger < finalinteger; indexinteger++) { // The execution will never reach here. } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-31

32 Endless Loops Never change the value of the index variable inside the loop Poor programming practice May lead to an endless loop // Poor Programming. For (int indexinteger = 1; indexinteger < 10; indexinteger++) { indexinteger = 1; } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-32

33 Exiting for Loops To exit an endless loop Click on an application's Close box Use the Stop Debugging button in the IDE Place a break statement to exit a for, while or do/while loop Good programming practices dictate exiting loops properly, not with a break McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-33

34 Skipping to the Next Iteration of a Loop Use a continue statement to skip the next iteration of the loop Continue statement transfers control to the end of the loop Retests the loop exit condition // Continue a for loop. for (int loopinteger = 0; loopinteger <= namelistbox.items.count 1; loopinteger++) { if (namelistbox.items[loopinteger].tostring() == string.empty) { continue; } // Code to do something with the name found. Console.WriteLine("Name = " + namelistbox.items[loopinteger].tostring()); } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-34

35 Making Entries Appear Selected Make text in a text box or list appear selected If a text box fails validation, select the text Selecting the entry in a text box When a user tabs into a text box that already has an entry, the user-friendly approach is to select the text Use the SelectAll method Place the SelectAll method in the text box s Enter event handler Occurs when the control receives the focus McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-35

36 Sending Information to the Printer Use the.net PrintDocument and PrintPreviewDialog components from the Printing tab of the toolbox Printing is done through the Windows environment Allows use of fonts installed on any given system Printing dialogs and page setup are the same as any other Microsoft product Several companies sell utilities that do a nice job of designing and printing reports C# Professional Edition and Team System Edition include Crystal Reports for creating reports from database files McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-36

37 The PrintDocument Component Set up output for the printer using methods and events of the PrintDocument component Appears in component tray McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-37

38 The PrintDocument Print Method Print method sends command to print information according to the layout specified in the PrintPage event handler Place Print method in the Click event handler for a button or menu item McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-38

39 Setting Up the Print Output The code to set up the printed page belongs in the PrintDocument's PrintPage event handler The PrintPage event fires once for each page to be printed This technique is referred to as a callback In a callback the object notifies the program it needs to do something by firing an event The PrintDocument Print method executes the PrintPage event handler Holds code that describes exactly how pages should print The PrintDocument object also fires events for BeginPrint and EndPrint Code can be written for these events System.Drawing.Printing.PrintPageEventArgs e argument Properties and methods of PrintPageEventArgs Determines page margins and sends a string of text to the page McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-39

40 The Graphics Page Set up a graphics page in memory Page is sent to the printer Page can contain strings of text and graphic elements Specify the exact X and Y coordinates of each element to be printed on the page The X coordinate is the horizontal distance across the page The Y coordinate is the vertical distance from the top of the page Measurements are in pixels McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-40

41 Using the DrawString Method Used to send a line of text to the graphics page Belongs to the Graphics object of the PrintPageEventArgs argument Is an overloaded method, there are several forms for calling the method Arguments of the DrawString method include What to print What font and color to print in Where to print, using X and Y coordinates Set up the font and coordinates before executing the DrawString method McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-41

42 The DrawString Method General Form (One simple argument list) GraphicsObject.DrawString(StringToPrint, Font, Brush, Xcoordinate, Ycoordinate); Examples e.graphics.drawstring(printlinestring, printfont, Brushes.Black, horizontalprintlocationfloat, verticalprintlocationfloat); e.graphics.drawstring("my text string", myfont, Brushes.Black, 100.0, 100.0); e.graphics.drawstring(nametextbox.text, new Font ("Arial", 10), Brushes.Red, leftmarginfloat, currentlinefloat); McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-42

43 Setting the X and Y Coordinates - 1 For each print line, specify X and Y coordinates Create variables declared as float data type to hold the X and Y values The PrintPageEventArgs argument has several useful properties to determine the present settings MarginBounds PageBounds PageSettings Example: Set the X coordinate to the current left margin and the Y coordinate to the top margin horizontalprintlocationfloat = e.marginbounds.left; verticalprintlocationfloat = e.marginbounds.top; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-43

44 Setting the X and Y Coordinates - 2 To print multiple lines, increment the Y coordinate (forces next line down the page) Add the height of a line to the previous Y coordinate to calculate the next line s Y coordinate Find height of a line in the current font using the font s GetHeight method // Declarations at the top of the method. Font printfont = new Font("Arial", 12); float lineheightfloat = printfont.getheight; float horizontalprintlocationfloat = e.marginbounds.left; float verticalprintlocationfloat = e.marginbounds.top; // Print a line. e.graphics.drawstring(printlinestring, printfont, Brushes.Black, horizontalprintlocationfloat, verticalprintlocationfloat; // Increment the Y position for the next line. verticalprintlocationfloat += lineheightfloat; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-44

45 Printing Summary Easy steps for nearly all printing tasks Place code in PrintPage event handler of the PrintDocument component 1.At the top of the method, define the font(s), line height, and X and Y coordinates 2.Set up the line to print 3.Print the line 4.Increment the Y coordinate if another line will be printed 5.Place steps 2, 3, and 4 inside a loop if there are multiple lines to print McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-45

46 Printing the Contents of a List Box Combine the techniques for printing, looping, and the list box properties The Items.Count property provides the number of iterations for the loop The Items collection allows the actual values from the list to print // Print out all items in the coffeecombobox list. for (int indexinteger = 0; indexinteger < coffeecombobox.items.count; indexinteger++) { // Set up a line. printlinestring = coffeecombobox.items[indexinteger]; // Send the line to the graphics page object. e.graphics.drawstring(printlinestring, printfont, Brushes.Black, horizontalprintlocationfloat, verticalprintlocationfloat); // Increment the Y position for the next line. verticalprintlocationfloat += lineheightfloat; } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-46

47 Printing the Selected Item from a List Use the Text property to print the selected item from a list box or combo box // Set up the line. printlinestring = Coffee: + coffeecombobox.text + Syrup: + syruplistbox.text; // Send the line to the graphics page object. e.graphics.drawstring(printlinestring, printfont, Brushes.Black, horizontalprintlocationfloat, verticalprintlocationfloat); McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-47

48 Aligning Decimal Columns - 1 It is important to align the decimal points of numeric data Proportional fonts make aligning decimal points tricky Format each number to be printed and measure the length of the formatted string Declare an object as a SizeF structure Has a Width property Use the MeasureString method of the Graphics class to determine the width of a formatted string in pixels McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-48

49 Aligning Decimal Columns - 2 // Print aligned columns. Font printfont = new Font("Arial", 12); float lineheightfloat = printfont.getheight(); float yfloat = e.marginbounds.top; for (decimal indexdecimal = 0m; indexdecimal < 2000m; indexdecimal += 500m) { e.graphics.drawstring("text", printfont, Brushes.Black, e.marginbounds.left, yfloat); string formattedoutputstring = indexdecimal.tostring("n"); //Measure the string using the font. SizeF fontsize = e.graphics.measurestring(formattedoutputstring, printfont); } // Determine start for number to end at column end. float column2float = 500f fontsize.width; e.graphics.drawstring(formattedoutputstring, printfont, Brushes.Black, column2float, yfloat); yfloat += lineheightfloat; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-49

50 Displaying a Print Preview - 1 View printer s output and choose to print or cancel Helpful for testing and debugging PrintPreviewDialog component is key Add control to component tray McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-50

51 Displaying a Print Preview - 2 The PrintPreviewDialog component uses a PrintDocument component declared for printer output Assign the PrintDocument to the Document property of the PrintPreviewDialog Execute the ShowDialog method The same PrintPage event handler executes as for the PrintDocument private void fileprintpreviewmenu_click(object sender, System.EventArgs e) { // Begin the process for print preview. printpreviewdialog1.document = printallprintdocument; printpreviewdialog1.showdialog(); } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-51

52 Printing Multiple Pages The PrintDocument's PrintPage event fires once for each page Set the HasMorePages property of the PrintPageEventArgs argument to true to print more than one page McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 7-52

Chapter 7. Lists, Loops, and Printing. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Chapter 7. Lists, Loops, and Printing. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 7 Lists, Loops, and Printing McGraw-Hill Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Objectives (1 of 2) Create and use list boxes and combo boxes. Differentiate among

More information

CIS 3260 Intro to Programming in C#

CIS 3260 Intro to Programming in C# Iteration (looping) McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Understand the necessity of this program control structure Describe while loops Describe do while loops Describe

More information

Working with Printers

Working with Printers Chapter 17 Working with Printers After completing this chapter, you will be able to: Print graphics from a Microsoft Visual Basic program. Print text from a Visual Basic program. Print multipage documents.

More information

Microsoft Visual Basic 2015: Reloaded

Microsoft Visual Basic 2015: Reloaded Microsoft Visual Basic 2015: Reloaded Sixth Edition Chapter Seven More on the Repetition Structure Objectives After studying this chapter, you should be able to: Code a counter-controlled loop Nest repetition

More information

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports Instructor s Programming Logic Printing Reports Programming Logic Quick Links & Text References Printing Custom Reports Printing Overview Page 575 Linking Printing Objects No book reference Creating a

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 5 Repeating Program Instructions Objectives After studying this chapter, you should be able to: Include the repetition structure in pseudocode

More information

Programming Language 2 (PL2)

Programming Language 2 (PL2) Programming Language 2 (PL2) 337.3.1 Illustrate the logical flow of program in sequence, selection and iteration structure 337.3.2 Apply selection and repetitive structure Repetition structure (or loop):

More information

Chapter 8. Arrays The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 8. Arrays The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 8 Arrays McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives Establish an array and refer to individual elements in the array with subscripts Use a foreach

More information

REPETITION CONTROL STRUCTURE LOGO

REPETITION CONTROL STRUCTURE LOGO CSC 128: FUNDAMENTALS OF COMPUTER PROBLEM SOLVING REPETITION CONTROL STRUCTURE 1 Contents 1 Introduction 2 for loop 3 while loop 4 do while loop 2 Introduction It is used when a statement or a block of

More information

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 11 Data Files McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives Store and retrieve data in files using streams Save the values from a list box and reload

More information

LECTURE 5 Control Structures Part 2

LECTURE 5 Control Structures Part 2 LECTURE 5 Control Structures Part 2 REPETITION STATEMENTS Repetition statements are called loops, and are used to repeat the same code multiple times in succession. The number of repetitions is based on

More information

Repeating Instructions. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies

Repeating Instructions. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies 6 Repeating Instructions C# Programming: From Problem Analysis to Program Design 2nd Edition David McDonald, Ph.D. Director of Emerging Technologies Chapter Objectives Learn why programs use loops Write

More information

C++ Programming: From Problem Analysis to Program Design, Third Edition

C++ Programming: From Problem Analysis to Program Design, Third Edition C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 5: Control Structures II (Repetition) Why Is Repetition Needed? Repetition allows you to efficiently use variables Can input,

More information

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved. www.nicelabel.com, info@nicelabel.com English Edition Rev-0910 2009 Euro Plus d.o.o. & Niceware International LLC All rights reserved. www.nicelabel.com Head Office Euro Plus d.o.o. Ulica Lojzeta Hrovata

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

Menus and Printing. Menus. A focal point of most Windows applications

Menus and Printing. Menus. A focal point of most Windows applications Menus and Printing Menus A focal point of most Windows applications Almost all applications have a MainMenu Bar or MenuStrip MainMenu Bar or MenuStrip resides under the title bar MainMenu or MenuStrip

More information

Islamic University of Gaza Computer Engineering Dept. C++ Programming. For Industrial And Electrical Engineering By Instructor: Ruba A.

Islamic University of Gaza Computer Engineering Dept. C++ Programming. For Industrial And Electrical Engineering By Instructor: Ruba A. Islamic University of Gaza Computer Engineering Dept. C++ Programming For Industrial And Electrical Engineering By Instructor: Ruba A. Salamh Chapter Four: Loops 2 Chapter Goals To implement while, for

More information

10Tec igrid for.net 6.0 What's New in the Release

10Tec igrid for.net 6.0 What's New in the Release What s New in igrid.net 6.0-1- 2018-Feb-15 10Tec igrid for.net 6.0 What's New in the Release Tags used to classify changes: [New] a totally new feature; [Change] a change in a member functionality or interactive

More information

Document Editor Basics

Document Editor Basics Document Editor Basics When you use the Document Editor option, either from ZP Toolbox or from the Output option drop-down box, you will be taken to the Report Designer Screen. While in this window, you

More information

Microsoft Excel Chapter 2. Formulas, Functions, and Formatting

Microsoft Excel Chapter 2. Formulas, Functions, and Formatting Microsoft Excel 2010 Chapter 2 Formulas, Functions, and Formatting Objectives Enter formulas using the keyboard Enter formulas using Point mode Apply the AVERAGE, MAX, and MIN functions Verify a formula

More information

All copyrights reserved - KV NAD, Aluva. Dinesh Kumar Ram PGT(CS) KV NAD Aluva

All copyrights reserved - KV NAD, Aluva. Dinesh Kumar Ram PGT(CS) KV NAD Aluva All copyrights reserved - KV NAD, Aluva Dinesh Kumar Ram PGT(CS) KV NAD Aluva Overview Looping Introduction While loops Syntax Examples Points to Observe Infinite Loops Examples using while loops do..

More information

Copyright 2014 Pearson Education, Inc. Chapter 5. Lists and Loops. Copyright 2014 Pearson Education, Inc.

Copyright 2014 Pearson Education, Inc. Chapter 5. Lists and Loops. Copyright 2014 Pearson Education, Inc. Chapter 5 Lists and Loops Topics 5.1 Input Boxes 5.2 List Boxes 5.3 Introduction to Loops: The Do While Loop 5.4 The Do Until and For Next Loops 5.5 Nested Loops 5.6 Multicolumn List Boxes, Checked List

More information

Chapter 2B: Lists and Loops

Chapter 2B: Lists and Loops Chapter 2B: Lists and Loops Introduction This chapter introduces: Input boxes List and combo boxes Loops Random numbers The ToolTip control Section 2B.1 Input Boxes Input boxes provide a simple way to

More information

ADJUST TABLE CELLS-ADJUST COLUMN AND ROW WIDTHS

ADJUST TABLE CELLS-ADJUST COLUMN AND ROW WIDTHS ADJUST TABLE CELLS-ADJUST COLUMN AND ROW WIDTHS There are different options that may be used to adjust columns and rows in a table. These will be described in this document. ADJUST COLUMN WIDTHS Select

More information

Programming. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies

Programming. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies 9 Programming Based on Events C# Programming: From Problem Analysis to Program Design 2nd Edition David McDonald, Ph.D. Director of Emerging Technologies Chapter Objectives Create applications that use

More information

V3 1/3/2015. Programming in C. Example 1. Example Ch 05 A 1. What if we want to process three different pairs of integers?

V3 1/3/2015. Programming in C. Example 1. Example Ch 05 A 1. What if we want to process three different pairs of integers? Programming in C 1 Example 1 What if we want to process three different pairs of integers? 2 Example 2 One solution is to copy and paste the necessary lines of code. Consider the following modification:

More information

C++ Programming: From Problem Analysis to Program Design, Fourth Edition. Chapter 5: Control Structures II (Repetition)

C++ Programming: From Problem Analysis to Program Design, Fourth Edition. Chapter 5: Control Structures II (Repetition) C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 5: Control Structures II (Repetition) Objectives In this chapter, you will: Learn about repetition (looping) control structures

More information

Chapter 5. Lists and Loops Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Chapter 5. Lists and Loops Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 5 Lists and Loops Addison Wesley is an imprint of 2011 Pearson Addison-Wesley. All rights reserved. Introduction This chapter introduces: Input boxes List and combo boxes Loops Random numbers The

More information

Chapter 4 Introduction to Control Statements

Chapter 4 Introduction to Control Statements Introduction to Control Statements Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives 2 How do you use the increment and decrement operators? What are the standard math methods?

More information

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. The Increment and Decrement Operators

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. The Increment and Decrement Operators Chapter 5: 5.1 Looping The Increment and Decrement Operators The Increment and Decrement Operators The Increment and Decrement Operators ++ is the increment operator. It adds one to a variable. val++;

More information

Chapter 15 Printing Reports

Chapter 15 Printing Reports Chapter 15 Printing Reports Introduction This chapter explains how to preview and print R&R reports. This information is presented in the following sections: Overview of Print Commands Selecting a Printer

More information

Lecture 7 Tao Wang 1

Lecture 7 Tao Wang 1 Lecture 7 Tao Wang 1 Objectives In this chapter, you will learn about: Interactive loop break and continue do-while for loop Common programming errors Scientists, Third Edition 2 while Loops while statement

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

Chapter 5 Control Statements: Part 2 Section 5.2 Essentials of Counter-Controlled Repetition

Chapter 5 Control Statements: Part 2 Section 5.2 Essentials of Counter-Controlled Repetition Chapter 5 Control Statements: Part 2 Section 5.2 Essentials of Counter-Controlled Repetition 5.2 Q1: Counter-controlled repetition requires a. A control variable and initial value. b. A control variable

More information

Excel Select a template category in the Office.com Templates section. 5. Click the Download button.

Excel Select a template category in the Office.com Templates section. 5. Click the Download button. Microsoft QUICK Excel 2010 Source Getting Started The Excel Window u v w z Creating a New Blank Workbook 2. Select New in the left pane. 3. Select the Blank workbook template in the Available Templates

More information

ECE 122. Engineering Problem Solving with Java

ECE 122. Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 10 For Loops and Arrays Outline Problem: How can I perform the same operations a fixed number of times? Considering for loops Performs same operations

More information

C++ Programming Lecture 7 Control Structure I (Repetition) Part I

C++ Programming Lecture 7 Control Structure I (Repetition) Part I C++ Programming Lecture 7 Control Structure I (Repetition) Part I By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department while Repetition Structure I Repetition structure Programmer

More information

Objectives. Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments

Objectives. Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments Basics Objectives Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments 2 Class Keyword class used to define new type specify

More information

Labels and Envelopes in Word 2013

Labels and Envelopes in Word 2013 Labels and Envelopes in Word 2013 Labels... 2 Labels - A Blank Page... 2 Selecting the Label Type... 2 Creating the Label Document... 2 Labels - A Page of the Same... 3 Printing to a Specific Label on

More information

CIS 3260 Intro to Programming with C#

CIS 3260 Intro to Programming with C# Variables, Constants and Calculations McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Define a variable Distinguish between variables, constants, and control objects Differentiate

More information

CS201 Some Important Definitions

CS201 Some Important Definitions CS201 Some Important Definitions For Viva Preparation 1. What is a program? A program is a precise sequence of steps to solve a particular problem. 2. What is a class? We write a C++ program using data

More information

Chapter 5: Control Structures II (Repetition) Objectives (cont d.) Objectives. while Looping (Repetition) Structure. Why Is Repetition Needed?

Chapter 5: Control Structures II (Repetition) Objectives (cont d.) Objectives. while Looping (Repetition) Structure. Why Is Repetition Needed? Chapter 5: Control Structures II (Repetition) Objectives In this chapter, you will: Learn about repetition (looping) control structures Explore how to construct and use countercontrolled, sentinel-controlled,

More information

Flag Quiz Application

Flag Quiz Application T U T O R I A L 17 Objectives In this tutorial, you will learn to: Create and initialize arrays. Store information in an array. Refer to individual elements of an array. Sort arrays. Use ComboBoxes to

More information

Chapter 2: Functions and Control Structures

Chapter 2: Functions and Control Structures Chapter 2: Functions and Control Structures TRUE/FALSE 1. A function definition contains the lines of code that make up a function. T PTS: 1 REF: 75 2. Functions are placed within parentheses that follow

More information

Variables and Functions. ROBOTC Software

Variables and Functions. ROBOTC Software Variables and Functions ROBOTC Software Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal numbers, and words Variable names follow the same

More information

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. Looping. ++ is the increment operator.

5.1. Chapter 5: The Increment and Decrement Operators. The Increment and Decrement Operators. Looping. ++ is the increment operator. Chapter 5: Looping 5.1 The Increment and Decrement Operators Copyright 2009 Pearson Education, Inc. Copyright Publishing as Pearson 2009 Addison-Wesley Pearson Education, Inc. Publishing as Pearson Addison-Wesley

More information

*Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* COMPUTER PROGRAMMING LECTURE 05 LOOPS IMRAN IHSAN

*Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* COMPUTER PROGRAMMING LECTURE 05 LOOPS IMRAN IHSAN PowerPoint Slides adapted from *Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* Copyright 2012 Pearson Education Inc. COMPUTER PROGRAMMING LECTURE 05 LOOPS IMRAN IHSAN

More information

P6 Professional Reporting Guide Version 18

P6 Professional Reporting Guide Version 18 P6 Professional Reporting Guide Version 18 August 2018 Contents About the P6 Professional Reporting Guide... 7 Producing Reports and Graphics... 9 Report Basics... 9 Reporting features... 9 Report Wizard...

More information

What we will learn in Introduction to Excel. How to Open Excel. Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah

What we will learn in Introduction to Excel. How to Open Excel. Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah What is Excel? It is a Microsoft Office computer software program to organize and analyze numbers, data and labels in spreadsheet

More information

An Introduction to Programming with C++ Sixth Edition. Chapter 7 The Repetition Structure

An Introduction to Programming with C++ Sixth Edition. Chapter 7 The Repetition Structure An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure Objectives Differentiate between a pretest loop and a posttest loop Include a pretest loop in pseudocode Include

More information

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2007 EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

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

Lesson Skill Matrix Skill Exam Objective Objective Number

Lesson Skill Matrix Skill Exam Objective Objective Number Lesson 6 Page 1 Creating Tables Lesson Skill Matrix Skill Exam Objective Objective Number Creating a Table Create a table by specifying rows and columns. 3.1.3 Formatting a Table Apply table styles. 3.1.4

More information

Skill Exam Objective Objective Number

Skill Exam Objective Objective Number Creating Tables 6 LESSON SKILL MATRIX Skill Exam Objective Objective Number Creating a Table Create a table by specifying rows and columns. 3.1.3 Formatting a Table Apply table styles. 3.1.4 Managing Tables

More information

Iteration: Intro. Two types of loops: 1. Pretest Condition precedes body Iterates 0+ times. 2. Posttest Condition follows body Iterates 1+ times

Iteration: Intro. Two types of loops: 1. Pretest Condition precedes body Iterates 0+ times. 2. Posttest Condition follows body Iterates 1+ times Iteration: Intro Two types of loops: 1. Pretest Condition precedes body Iterates 0+ times 2. Posttest Condition follows body Iterates 1+ times 1 Iteration: While Loops Pretest loop Most general loop construct

More information

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 Quick Summary A workbook an Excel document that stores data contains one or more pages called a worksheet. A worksheet or spreadsheet is stored in a workbook, and

More information

Loops! Loops! Loops! Lecture 5 COP 3014 Fall September 25, 2017

Loops! Loops! Loops! Lecture 5 COP 3014 Fall September 25, 2017 Loops! Loops! Loops! Lecture 5 COP 3014 Fall 2017 September 25, 2017 Repetition Statements Repetition statements are called loops, and are used to repeat the same code mulitple times in succession. The

More information

Excel Level Three. You can also go the Format, Column, Width menu to enter the new width of the column.

Excel Level Three. You can also go the Format, Column, Width menu to enter the new width of the column. Introduction Excel Level Three This workshop shows you how to change column and rows, insert and delete columns and rows, how and what to print, and setting up to print your documents. Contents Introduction

More information

GridLang: Grid Based Game Development Language Language Reference Manual. Programming Language and Translators - Spring 2017 Prof.

GridLang: Grid Based Game Development Language Language Reference Manual. Programming Language and Translators - Spring 2017 Prof. GridLang: Grid Based Game Development Language Language Reference Manual Programming Language and Translators - Spring 2017 Prof. Stephen Edwards Akshay Nagpal Dhruv Shekhawat Parth Panchmatia Sagar Damani

More information

Chapter 6 Dialogs. Creating a Dialog Style Form

Chapter 6 Dialogs. Creating a Dialog Style Form Chapter 6 Dialogs We all know the importance of dialogs in Windows applications. Dialogs using the.net FCL are very easy to implement if you already know how to use basic controls on forms. A dialog is

More information

Chapter 5: Control Structures II (Repetition)

Chapter 5: Control Structures II (Repetition) Chapter 5: Control Structures II (Repetition) 1 Objectives Learn about repetition (looping) control structures Explore how to construct and use count-controlled, sentinel-controlled, flag-controlled, and

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

The Menu and Toolbar in Excel (see below) look much like the Word tools and most of the tools behave as you would expect.

The Menu and Toolbar in Excel (see below) look much like the Word tools and most of the tools behave as you would expect. Launch the Microsoft Excel Program Click on the program icon in Launcher or the Microsoft Office Shortcut Bar. A worksheet is a grid, made up of columns, which are lettered and rows, and are numbered.

More information

Word Tutorial 3. Creating a Multiple- Page Report COMPREHENSIVE

Word Tutorial 3. Creating a Multiple- Page Report COMPREHENSIVE Word Tutorial 3 Creating a Multiple- Page Report COMPREHENSIVE Objectives Format headings with Quick Styles Insert a manual page break Create and edit a table Sort rows in a table Modify a table s structure

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

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace C++ Style Guide 1.0 General The purpose of the style guide is not to restrict your programming, but rather to establish a consistent format for your programs. This will help you debug and maintain your

More information

Unit 3 Decision making, Looping and Arrays

Unit 3 Decision making, Looping and Arrays Unit 3 Decision making, Looping and Arrays Decision Making During programming, we have a number of situations where we may have to change the order of execution of statements based on certain conditions.

More information

CS 106 Introduction to Computer Science I

CS 106 Introduction to Computer Science I CS 106 Introduction to Computer Science I 02 / 15 / 2016 Instructor: Michael Eckmann Questions? Comments? Loops to repeat code while loops for loops do while loops Today s Topics Logical operators Example

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

Working with Tables in Word 2010

Working with Tables in Word 2010 Working with Tables in Word 2010 Table of Contents INSERT OR CREATE A TABLE... 2 USE TABLE TEMPLATES (QUICK TABLES)... 2 USE THE TABLE MENU... 2 USE THE INSERT TABLE COMMAND... 2 KNOW YOUR AUTOFIT OPTIONS...

More information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. 9 Self-Test Exercises p. 11 History Note p. 12 Programming and

More information

Chapter 6 Setting Defaults

Chapter 6 Setting Defaults Chapter 6 Setting Defaults Introduction This chapter explains how to change R&R s default settings settings that R&R uses automatically unless you override them for each report. This information is presented

More information

Introduction to the Java Basics: Control Flow Statements

Introduction to the Java Basics: Control Flow Statements Lesson 3: Introduction to the Java Basics: Control Flow Statements Repetition Structures THEORY Variable Assignment You can only assign a value to a variable that is consistent with the variable s declared

More information

Increment and the While. Class 15

Increment and the While. Class 15 Increment and the While Class 15 Increment and Decrement Operators Increment and Decrement Increase or decrease a value by one, respectively. the most common operation in all of programming is to increment

More information

CST242 Windows Forms with C# Page 1

CST242 Windows Forms with C# Page 1 CST242 Windows Forms with C# Page 1 1 2 4 5 6 7 9 10 Windows Forms with C# CST242 Visual C# Windows Forms Applications A user interface that is designed for running Windows-based Desktop applications A

More information

Chapter 5: Prefix vs. Postfix 8/19/2018. The Increment and Decrement Operators. Increment and Decrement Operators in Program 5-1

Chapter 5: Prefix vs. Postfix 8/19/2018. The Increment and Decrement Operators. Increment and Decrement Operators in Program 5-1 Chapter 5: Loops and Files The Increment and Decrement Operators ++ is the increment operator. It adds one to a variable. val++; is the same as val = val + 1; ++ can be used before (prefix) or after (postfix)

More information

Chapter 13. Graphics, Animation, Sound and Drag-and-Drop The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 13. Graphics, Animation, Sound and Drag-and-Drop The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 13 Graphics, Animation, Sound and Drag-and-Drop McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives - 1 Use Graphics methods to draw shapes, lines, and filled

More information

Repe$$on CSC 121 Spring 2017 Howard Rosenthal

Repe$$on CSC 121 Spring 2017 Howard Rosenthal Repe$$on CSC 121 Spring 2017 Howard Rosenthal Lesson Goals Learn the following three repetition structures in Java, their syntax, their similarities and differences, and how to avoid common errors when

More information

Problem Solving with C++

Problem Solving with C++ GLOBAL EDITION Problem Solving with C++ NINTH EDITION Walter Savitch Kendrick Mock Ninth Edition PROBLEM SOLVING with C++ Problem Solving with C++, Global Edition Cover Title Copyright Contents Chapter

More information

Advanced Reporting Tool

Advanced Reporting Tool Advanced Reporting Tool The Advanced Reporting tool is designed to allow users to quickly and easily create new reports or modify existing reports for use in the Rewards system. The tool utilizes the Active

More information

CONVERSION GUIDE Financial Statement Files from CSA to Accounting CS

CONVERSION GUIDE Financial Statement Files from CSA to Accounting CS CONVERSION GUIDE Financial Statement Files from CSA to Accounting CS Introduction and conversion program overview... 1 Conversion considerations and recommendations... 1 Conversion procedures... 2 Data

More information

Using Reports. Access 2013 Unit D. Property of Cengage Learning. Unit Objectives. Files You Will Need

Using Reports. Access 2013 Unit D. Property of Cengage Learning. Unit Objectives. Files You Will Need Unit D CASE Samantha Hooper, a tour developer at Quest Specialty Travel, asks you to produce some reports to help her share and analyze data. A report is an Access object that creates a professional looking

More information

The Newsletter will contain a Title for the newsletter, a regular border, columns, Page numbers, Header and Footer and two images.

The Newsletter will contain a Title for the newsletter, a regular border, columns, Page numbers, Header and Footer and two images. Creating the Newsletter Overview: You will be creating a cover page and a newsletter. The Cover page will include Your Name, Your Teacher's Name, the Title of the Newsletter, the Date, Period Number, an

More information

Overview of C, Part 2. CSE 130: Introduction to Programming in C Stony Brook University

Overview of C, Part 2. CSE 130: Introduction to Programming in C Stony Brook University Overview of C, Part 2 CSE 130: Introduction to Programming in C Stony Brook University Integer Arithmetic in C Addition, subtraction, and multiplication work as you would expect Division (/) returns the

More information

Control Structures of C++ Programming (2)

Control Structures of C++ Programming (2) Control Structures of C++ Programming (2) CISC1600/1610 Computer Science I/Lab Fall 2016 CISC 1600 Yanjun Li 1 Loops Purpose: Execute a block of code multiple times (repeat) Types: for, while, do/while

More information

SIMPLE TEXT LAYOUT FOR COREL DRAW. When you start Corel Draw, you will see the following welcome screen.

SIMPLE TEXT LAYOUT FOR COREL DRAW. When you start Corel Draw, you will see the following welcome screen. SIMPLE TEXT LAYOUT FOR COREL DRAW When you start Corel Draw, you will see the following welcome screen. A. Start a new job by left clicking New Graphic. B. Place your mouse cursor over the page width box.

More information

1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell?

1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell? Q75-100 1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell? A. Reference Finder B. Range Finder C. Reference Checker D. Address Finder B. Range

More information

Introduction to Excel 2007 for ESL students

Introduction to Excel 2007 for ESL students Introduction to Excel 2007 for ESL students Download at http://www.rtlibrary.org/excel2007esl.pdf Developed 2010 by Barb Hauck-Mah, Rockaway Township Library for The American Dream Starts @your Library

More information

Band Editor User Guide Version 1.3 Last Updated 9/19/07

Band Editor User Guide Version 1.3 Last Updated 9/19/07 Version 1.3 Evisions, Inc. 14522 Myford Road Irvine, CA 92606 Phone: 949.833.1384 Fax: 714.730.2524 http://www.evisions.com/support Table of Contents 1 - Introduction... 4 2 - Report Design... 7 Select

More information

Creating Labels using Label Designer

Creating Labels using Label Designer Creating and setting up a Single Spine Label Template. Creating Labels using Label Designer 1. Click on the Label Designer wizard found under Common Tasks in the Tech Toolbar. A listing of saved templates

More information

Units 0 to 4 Groovy: Introduction upto Arrays Revision Guide

Units 0 to 4 Groovy: Introduction upto Arrays Revision Guide Units 0 to 4 Groovy: Introduction upto Arrays Revision Guide Second Year Edition Name: Tutorial Group: Groovy can be obtained freely by going to http://groovy-lang.org/download Page 1 of 8 Variables Variables

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All for repetition statement do while repetition statement switch multiple-selection statement break statement continue statement Logical

More information

Creating Business Cards With LibreOffice

Creating Business Cards With LibreOffice Creating Business Cards With LibreOffice by Len Nasman, Bristol Village Ohio Computer Club Copyright 2018 ~ may be copied with permission The illustrations in this document were created using LibreOffice

More information

Section 8 Formatting

Section 8 Formatting Section 8 Formatting By the end of this Section you should be able to: Format Numbers, Dates & Percentages Change Cell Alignment and Rotate Text Add Borders and Colour Change Row Height and Column Width

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Visual C# Program: Simple Game 3

Visual C# Program: Simple Game 3 C h a p t e r 6C Visual C# Program: Simple Game 3 In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Opening Visual C# Editor Beginning a

More information

Arrays. Comp Sci 1570 Introduction to C++ Array basics. arrays. Arrays as parameters to functions. Sorting arrays. Random stuff

Arrays. Comp Sci 1570 Introduction to C++ Array basics. arrays. Arrays as parameters to functions. Sorting arrays. Random stuff and Arrays Comp Sci 1570 Introduction to C++ Outline and 1 2 Multi-dimensional and 3 4 5 Outline and 1 2 Multi-dimensional and 3 4 5 Array declaration and An array is a series of elements of the same type

More information

Programming in C# Project 1:

Programming in C# Project 1: Programming in C# Project 1: Set the text in the Form s title bar. Change the Form s background color. Place a Label control on the Form. Display text in a Label control. Place a PictureBox control on

More information

Laser Engraving Using Base and Mass Production Modules

Laser Engraving Using Base and Mass Production Modules ARPATHIA GRAPHIC INTERFACE Users Reference Guide Laser Engraving Using Base and Mass Production Modules 1 Table of Contents Page CGI Modules Carpathia Installation Carpathia Document Writer installation

More information