Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice
|
|
- Beverly Byrd
- 6 years ago
- Views:
Transcription
1 Visual Basic Lab Sheet 4: Non Object-Oriented Programming Practice This lab sheet builds on the basic programming you have done so far, bringing elements of file handling, data structuring and information retrieval. By the end of this lab, you will have had experience in: Saving information to a file Retrieving information from a file Sorting data using a simple sorting algorithm Specific actions you are perform in this lab session will be indicated with a symbol. Assignment 1: Set up a simple (array-based) data structure In this exercise we will create a simple application core with a data structure of student information. We can think of a data structure as simply the way that programming language facilities allow us to organise information for easier retrieval, management etc. In this case, our data structure will be an array of user-defined types (UDTs), each element storing the name, matric number and course code for a single student. This data structure could be pictured as a set of card index entries: To begin this project: Joe Bloggs PGDITO-98 Start Visual Basic Rename the Project to Students and the Form to frmstudents. Add a new code module to the project (right click in the project explorer, choose New Module) and name this modstudents Save the project in a new folder (called Students) We now need to define the data structure for holding the student information. There will be two components to this a UDT for a structure to hold the data for a single student, and an array declaration for holding a number of student records. Double click on the code module entry in the project explorer, and enter the following code into the code window: Option Explicit Type Student Name As String Matric As String CourseCode As String End Type A.McMonnies, CIS Page 1 02/10/2000
2 Const MAXSTUDENT = 20 Private Students(1 To MAXSTUDENT) As Student Private LastStudent As Integer The above structure definitions give us the facility to store the records of 20 students in out program. The next stage in this process is to add Subs and/or Functions to allow us to add information to this structure, look up information and make changes to it. Note that since the StudentList structure has been declared as private, we will need to use code to manipulate this information within a project. Define a subroutine to enter a student s details in the code module: Public Sub () LastStudent = LastStudent+1 If LastStudent > MAXSTUDENT Then MsgBox No more room Else Students(LastStudent).Name = InputBox( Enter name ) Students(LastStudent).Matric = InputBox( Enter matric ) Students(LastStudent).CourseCode = _ InputBox( Enter code ) Note you should enter the student name as Surname, Initial e.g. Smith, J. we need a way to report on a particular student. A subroutine that will return a descriptive string, given a number that corresponds to the position in the array (e.g. 5 => 5 th entry in the array, Students(5)) would suit). Enter a function to return student information Public Function GetStudent(n As Integer) As String Dim result as String If n<1 Or n>laststudent Then MsgBox No entry at this number result = Else result = Students(n).Name & vbcrlf result = result & Students(n).Matric & vbcrlf result = result & Students(n).CourseCode GetStudent = result End Function Using this function, a call such as: will result in the information in the second entry in the array being packed into a string and displayed by the MsgBox statement, or an error message if there is not a second entry. A.McMonnies, CIS Page 2 02/10/2000
3 Test the data subsystem developed so far, by entering the details for 3 or 4 students from the Immediate Window (simply type 3 or 4 times in the Immediate Window), and then retrieving one of these (say the second) by typing. A short Sub can be added to the module so that the entire list can be displayed. This will simplify testing and debugging your project: Exercise: Public Sub DisplayList() Dim i As Integer, d As String For i = 1 To LastStudent d = d & Students(i).Name & ", " & _ Students(i).Matric & ", " & _ Students(i).CourseCode & vbcrlf MsgBox d 1. Add command buttons to the form and code their _Click( ) event handlers to enable (a) a new student to be entered and (b) the list of students to be displayed. Assignment 2 Making the Data Structure Persistent If you needed to test the data subsystem developed so-far more than once, you will probavbly be well aware of the annoyance of having to re-enter the same information over and over. We can get around this problem by adding functions to store and retrieve the array information in a disk file. Lets assume that we wish the disk file to be structured as shown below: <Number of entries> <First entry name> <First entry matric> <First entry course code> <Second entry name> <Second entry matric> < There are a number of possible formats that could be used, but the above is simple and efficient. The algorithm for storing the data is therefore: Get file handle Open file for output Send LastStudent to file For entry From 1 To LastStudent Send entry name to file Send entry matric to file Send entry coursecode to file Close file Create the SaveList and LoadList subroutines Public Sub SaveList(FileName As String) A.McMonnies, CIS Page 3 02/10/2000
4 Dim f As Integer, entry As Integer F = FreeFile Open FileName For Output As #f Write #f, LastStudent For entry = 1 To LastStudent Write #f, Students(entry).Name, _ Students(entry).matric, _ Students(entry).CourseCode Close #f The other side of this coin is that we need to be able to retrieve the information from disk again. The code to do this is almost a mirror of the SaveList sub: Public Sub LoadList(FileName As String) Dim f As Integer, entry As Integer F = FreeFile Open FileName For Input As #f Input #f, LastStudent For entry = 1 To LastStudent Input #f, Students(entry).Name, _ Students(entry).Matric, _ Students(entry).CourseCode Close #f By this stage, we should be able to test the system by entering some sets of data, saving them to file and retrieving them. If for any reason, a test causes the program to terminate, there will be no need to re-enter the data since it is saved on disk. Enter some data and store it to disk from the immediate window: SaveList \Students.dat ***** NOTE Note that in the call to SaveList, you will need to provide your own filename. I would suggest saving the information to the folder in your personal network folder that the project files are stored in. This will make it much easier to connect the program with the data at a later date. See the following exercise for a programming hint relating to this. You can now try to retrieve the information from the program. First, you should terminate the program by making sure the project is not in a running state (press the stop button on the toolbar, or Run/End from the menus) From the immediate window, enter: LoadList \Students.dat MsgBox GetStudent(1) MsgBox GetStudent(3) etc A.McMonnies, CIS Page 4 02/10/2000
5 If all is well, the array of information should have been restored. You can add data to the array at this point, re-save the structure and, the next time you load the list, all entries, including the new ones, should be restored. Exercise: 1. Add command buttons to the form to cause the list of students to be stored and retrieved. You can use the following expression to provide a full file name in both cases: App.Path & \Students.dat Note that this file name specifies that the file will be loaded from and saved to the same folder that the project files are stored in. App.Path is simply the project folder. Assignment 3: Sorting the information into order Information can be searched more easily if it is stored in some order. For example, we could store student records in alphabetical order of name. In this exercise, you will add routines to the code module to allow the information in the array to be sorted into order. Enter the following Sub definition: Private Sub Swap(S1 As Student, S2 As Student) Dim temp As Student temp = S1 S1 = S2 S2 = temp By defining a routine to swap two entries in the array, the sort routine will be reduced in apparent complexity. There are a number of possible sorting strategies that could be used: Bubblesort : keep swapping adjacent elements I the array until it is in order Selection-sort : sort by finding smallest, then next smallest etc., moving them up to correct place in the list Quicksort : an advanced algorithm that minimises the sort time for large lists We will implement the Bubblesort algorithm: Public Sub BSortList() Dim did_a_swap As Boolean, pos As Integer did_a_swap = True ' kick start the algorithm While did_a_swap did_a_swap = False For pos = 1 To LastStudent - 1 If Students(pos).Name > Students(pos + 1).Name Then Swap Students(pos), Students(pos + 1) did_a_swap = True Wend To test this, we can load a list of student entries, sort them and then determine if they are in the right A.McMonnies, CIS Page 5 02/10/2000
6 order. The following immediate window sequence will help to determine this: LoadList <FileName> MsgBox GetStudent(1) MsgBox GetStudent(3) BSortList MsgBox GetStudent(1) MsgBox GetStudent(3) etc. to display all entries. etc. to display all entries. The second time the list is displayed, entries should appear in alphabetical order. Additional Exercises: 1. Add a button to the form to cause the list of students to be sorted. 2. (Advanced) Write a second sort routine, SSortList, using the Selection sort algorithm (listed below in pseudocode). For pos From first to last min = pos For cmp = pos+1 To last If Students(cmp).Name < Students(min).Name Then Swap Students(cmp) with Students (min) Summary You should now be able to write programs in which simple data is well structured and can be made persistent by saving to disk files. You may wish to return to previous exercises and try to add persistence to them, and to try expending them by making use of arrays and UDTs. END OF LAB SHEET A.McMonnies, CIS Page 6 02/10/2000
(Subroutines in Visual Basic)
Ch 7 Procedures (Subroutines in Visual Basic) Visual Basic Procedures Structured Programs To simplify writing complex programs, most Programmers (Designers/Developers) choose to split the problem into
More informationFunction: function procedures and sub procedures share the same characteristics, with
Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures
More informationCOP 1170 Introduction to Computer Programming using Visual Basic
Course Justification This course is the first computer programming course in the Computer Information Systems Associate in Arts degree program; is required in the Computer Programming and Analysis, Database
More information5/31/2006. Last Time. Announcements. Today. Variable Scope. Variable Lifetime. Variable Scope - Cont. The File class. Assn 3 due this evening.
Last Time Announcements The File class. Back to methods Passing parameters by value and by reference. Review class attributes. An exercise to review File I/O, look at passing by reference and the use of
More informationVisual Basic for Applications
Visual Basic for Applications Programming Damiano SOMENZI School of Economics and Management Advanced Computer Skills damiano.somenzi@unibz.it Week 10 Outline 1 Algorithms Sorting Exercises: exchange values,
More informationSearch,Sort,Recursion
Search,Sort,Recursion Searching, Sorting and Recursion Searching Linear Search Inserting into an Array Deleting from an Array Selection Sort Bubble Sort Binary Search Recursive Binary Search Searching
More informationSébastien Mathier wwwexcel-pratiquecom/en Variables : Variables make it possible to store all sorts of information Here's the first example : 'Display the value of the variable in a dialog box 'Declaring
More informationLevel 3 Computing Year 2 Lecturer: Phil Smith
Level 3 Computing Year 2 Lecturer: Phil Smith Previously We started to build a GUI program using visual studio 2010 and vb.net. We have a form designed. We have started to write the code to provided the
More informationAgenda. First Example 24/09/2009 INTRODUCTION TO VBA PROGRAMMING. First Example. The world s simplest calculator...
INTRODUCTION TO VBA PROGRAMMING LESSON2 dario.bonino@polito.it Agenda First Example Simple Calculator First Example The world s simplest calculator... 1 Simple Calculator We want to design and implement
More informationDefinition: A data structure is a way of organizing data in a computer so that it can be used efficiently.
The Science of Computing I Lesson 4: Introduction to Data Structures Living with Cyber Pillar: Data Structures The need for data structures The algorithms we design to solve problems rarely do so without
More informationLab 4: Adding a Windows User-Interface
Lab 4: Adding a Windows User-Interface In this lab, you will cover the following topics: Creating a Form for use with Investment objects Writing event-handler code to interact with Investment objects Using
More informationLab 6: Making a program persistent
Lab 6: Making a program persistent In this lab, you will cover the following topics: Using the windows registry to make parts of the user interface sticky Using serialization to save application data in
More informationCS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications
CS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications Friday, January 23, 2004 We are going to continue using the vending machine example to illustrate some more of Access properties. Advanced
More informationArrays. Storing Multiple Values
Arrays Storing Multiple Values Motels If you have a room in a motel and they give you room 5, which room is it? 1 2 3 4 5 6 Hotels If you have room 1541 in the Deluxe Ritz Hilton, which floor would you
More informationComputer Science & Engineering 150A Problem Solving Using Computers
Computer Science & Engineering 150A Problem Solving Using Computers Lecture 06 - Stephen Scott Adapted from Christopher M. Bourke 1 / 30 Fall 2009 Chapter 8 8.1 Declaring and 8.2 Array Subscripts 8.3 Using
More informationIteration -- Once Is Not Enough
Iteration -- Once Is Not Enough ),7 Congratulations! The Day Find project is done! -- Reflect This is a significant accomplishment Understand a fundamental algorithm -- binary search Know how to search
More informationChapter 2.4: Common facilities of procedural languages
Chapter 2.4: Common facilities of procedural languages 2.4 (a) Understand and use assignment statements. Assignment An assignment is an instruction in a program that places a value into a specified variable.
More informationCOP 1220 Introduction to Programming in C++ Course Justification
Course Justification This course is a required first programming C++ course in the following degrees: Associate of Arts in Computer Science, Associate in Science: Computer Programming and Analysis; Game
More informationfor (int outercounter = nums.length - 1; outercounter > 0 && swappedthatturn; outercounter --
/* * A small set of sorting algorithms, written in Java and C++ * Note that they are written by a C++ beginner, may contain mistakes * Or bad habits that have to be avoided * @author Kadir Can Çelik */
More informationCMPT 110 MIDTERM OCTOBER 18, 2001
CMPT 110 MIDTERM OCTOBER 18, 2001 1 What will be displayed when the command button is clicked? 7% Level of difficulty 7 (out of 10) Assume there is a command button called cmdbutton Assume there is a picturebox
More informationMIS 216 SPRING 2018 PROJECT 4
MIS 216 SPRING 2018 PROJECT 4 Subs / Functions Arrays / Classes 1. Start a new project a. Create a folder on your desktop name it yourinitialsproject3 as in tnjproject3. b. FILE NEW PROJECT c. Change the
More informationToday. CISC101 Reminders & Notes. Searching in Python - Cont. Searching in Python. From last time
CISC101 Reminders & Notes Test 3 this week in tutorial USATs at the beginning of next lecture Please attend and fill out an evaluation School of Computing First Year Information Session Thursday, March
More informationVBA 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 informationMS Excel VBA Class Goals
MS Excel VBA 2013 Class Overview: Microsoft excel VBA training course is for those responsible for very large and variable amounts of data, or teams, who want to learn how to program features and functions
More informationIndividual research task. You should all have completed the research task set last week. Please make sure you hand it in today.
Lecture 6 Individual research task. You should all have completed the research task set last week. Please make sure you hand it in today. Previously Decision structures with flowcharts Boolean logic UML
More informationSearching & Sorting in Java Bubble Sort
With the bubble sort, the basic idea is to compare adjacent values and exchange them if they are not in order. Consider the following example which shows the first pass through the algorithm. 1. Compare
More information6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:
VBA program units: Subroutines and Functions Subs: a chunk of VBA code that can be executed by running it from Excel, from the VBE, or by being called by another VBA subprogram can be created with the
More informationHow to modify convert task to use variable value from source file in output file name
Page 1 of 6 How to modify convert task to use variable value from source file in output file name The default SolidWorks convert task add-in does not have support for extracting variable values from the
More informationSoftware Development Techniques. 26 November Marking Scheme
Software Development Techniques 26 November 2015 Marking Scheme This marking scheme has been prepared as a guide only to markers. This is not a set of model answers, or the exclusive answers to the questions,
More informationFundamentals of Computing and Digital Literacy. Sample. Marking Scheme
Fundamentals of Computing and Digital Literacy Sample Marking Scheme This Marking Scheme has been prepared as a guide only to markers. This is not a set of model answers, nor is the Marking Scheme exclusive,
More informationCambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level. Published
Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level COMPUTER SCIENCE 9608/21 Paper 2 Written Paper MARK SCHEME Maximum Mark: 75 Published This mark
More informationSCJ2013 Data Structure & Algorithms. Bubble Sort. Nor Bahiah Hj Ahmad & Dayang Norhayati A. Jawawi
SCJ2013 Data Structure & Algorithms Bubble Sort Nor Bahiah Hj Ahmad & Dayang Norhayati A. Jawawi 1 Bubble Sort Sorting activities for Bubble: Go through multiple passes over the array. In every pass: Compare
More informationHigher Computing Science Software Design and Development - Programming Summary Notes
Higher Computing Science Software Design and Development - Programming Summary Notes Design notations A design notation is the method we use to write down our program design. Pseudocode is written using
More informationNew Concepts. Lab 7 Using Arrays, an Introduction
Lab 7 Using Arrays, an Introduction New Concepts Grading: This lab requires the use of the grading sheet for responses that must be checked by your instructor (marked as Question) AND the submission of
More informationSTRING Represents group of characters Each character 1 byte CIE, AB304 BOOLEAN Logical Datatype, return true or False Memory Required 1
2.2 Data representation 2.2.1 Data types A data type is a method of interpreting a pattern of bits. There are numerous different data types but here explained ones are according to CIE syllabus: Integer
More informationProgrammers should write code that is self-documenting and split into small sections.
Writing Programs What are good program writing techniques? Programmers should write code that is self-documenting and split into small sections. Specifically, the programmers should: use meaningful identifier
More informationUnitSales Array Product Number Sales Region
IS 320 Aut 96 Page 1 1. (10) Assume you have a list box named List1, which has its Multiselect property set to 2 - Extended. Write a click event procedure for this list box that deletes the selected items
More informationMicrosoft Excel 2016 Level 1
Microsoft Excel 2016 Level 1 One Day Course Course Description You have basic computer skills such as using a mouse, navigating through windows, and surfing the Internet. You have also used paper-based
More informationTopics. Sorting. Sorting. 1) How can we sort data in an array? a) Selection Sort b) Insertion Sort
Topics 1) How can we sort data in an array? a) Selection Sort b) Insertion Sort 2) How can we search for an element in an array? a) Linear Search b) Binary Search Slides #15 Sections 9.1-9.5 Sorting and
More informationWeb Site Development with HTML/JavaScrip
Hands-On Web Site Development with HTML/JavaScrip Course Description This Hands-On Web programming course provides a thorough introduction to implementing a full-featured Web site on the Internet or corporate
More informationMARK SCHEME for the October/November 2013 series 9691 COMPUTING. 9691/23 Paper 2 (Written Paper), maximum raw mark 75
CAMBRIDGE INTERNATIONAL EXAMINATIONS GCE Advanced Subsidiary Level and GCE Advanced Level MARK SCHEME for the October/November 2013 series 9691 COMPUTING 9691/23 Paper 2 (Written Paper), maximum raw mark
More informationLab1: Introductory and Setup Activities
Objectives: Lab1: Introductory and Setup Activities - to map network drives - to use email to submit documents - to work on Robotics exercises - to gain exposure to robotics programming - to become more
More informationWelcome To VTL Course
Welcome To VTL Course VertexFX Trading Language Course Hybrid Solutions www.hybrid-solutions.com Contents 1 Hot Tips 2 Introduction 3 Programming structure 4 VTL Client Script 5 VTL Server Script Hot Tip
More informationCS 351 Design of Large Programs Programming Abstractions
CS 351 Design of Large Programs Programming Abstractions Brooke Chenoweth University of New Mexico Spring 2019 Searching for the Right Abstraction The language we speak relates to the way we think. The
More informationA Back-End Link Checker for Your Access Database
A Back-End for Your Access Database Published: 30 September 2018 Author: Martin Green Screenshots: Access 2016, Windows 10 For Access Versions: 2007, 2010, 2013, 2016 Working with Split Databases When
More informationStart Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)
Session 1 Start Visual Basic Use the Visual Basic programming environment Understand Essential Visual Basic menu commands and programming procedure Change Property setting Use Online Help and Exit Visual
More informationCreating an Excel resource
Excel Mobile Excel Mobile is a Microsoft application similar to Excel, but designed to run on handhelds. This mobile version of Excel is a spreadsheet application that allows you to manipulate numbers,
More informationLECTURE 17. Array Searching and Sorting
LECTURE 17 Array Searching and Sorting ARRAY SEARCHING AND SORTING Today we ll be covering some of the more common ways for searching through an array to find an item, as well as some common ways to sort
More informationvariables programming statements
1 VB PROGRAMMERS GUIDE LESSON 1 File: VbGuideL1.doc Date Started: May 24, 2002 Last Update: Dec 27, 2002 ISBN: 0-9730824-9-6 Version: 0.0 INTRODUCTION TO VB PROGRAMMING VB stands for Visual Basic. Visual
More informationLab 9 Loops, Debugging
Lab 9 Loops, Debugging The following exercises are to be completed during lab class. If you do not have time to finish during lab, they must be completed before the beginning of the following lab session.
More informationDATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA
More informationSt. Benedict s High School. Computing Science. Software Design & Development. (Part 1 Computer Programming) National 5
Computing Science Software Design & Development (Part 1 Computer Programming) National 5 VARIABLES & DATA TYPES Variables provide temporary storage for information that will be needed while a program is
More informationUnit 6 - Software Design and Development LESSON 3 KEY FEATURES
Unit 6 - Software Design and Development LESSON 3 KEY FEATURES Last session 1. Language generations. 2. Reasons why languages are used by organisations. 1. Proprietary or open source. 2. Features and tools.
More informationMathematics LBS 4. Spreadsheet Mathematics: Statistics and Graphing. Finding the Mean, Median, & Mode
Mathematics LBS 4 Spreadsheet Mathematics: Statistics and Graphing Lab 2: Finding the Mean, Median, & Mode Microsoft Excel Logo and all screens captured by permission of Microsoft Goal To use Excel to
More informationOPTIS Labs Tutorials 2013
OPTIS Labs Tutorials 2013 Table of Contents Virtual Human Vision Lab... 4 Doing Legibility and Visibility Analysis... 4 Automation... 13 Using Automation... 13 Creation of a VB script... 13 Creation of
More informationCS 61B Summer 2005 (Porter) Midterm 2 July 21, SOLUTIONS. Do not open until told to begin
CS 61B Summer 2005 (Porter) Midterm 2 July 21, 2005 - SOLUTIONS Do not open until told to begin This exam is CLOSED BOOK, but you may use 1 letter-sized page of notes that you have created. Problem 0:
More informationAgenda. Arrays 01/12/2009 INTRODUCTION TO VBA PROGRAMMING. Arrays Matrices.
INTRODUCTION TO VBA PROGRAMMING LESSON6 dario.bonino@polito.it Agenda Matrices 1 Allow to store vectorial data Geometric vectors Sets of data having something in common... Declared as Dim array_name (begin
More informationCopyright. Trademarks Attachmate Corporation. All rights reserved. USA Patents Pending. WRQ ReflectionVisual Basic User Guide
PROGRAMMING WITH REFLECTION: VISUAL BASIC USER GUIDE WINDOWS XP WINDOWS 2000 WINDOWS SERVER 2003 WINDOWS 2000 SERVER WINDOWS TERMINAL SERVER CITRIX METAFRAME CITRIX METRAFRAME XP ENGLISH Copyright 1994-2006
More informationVariable A variable is a value that can change during the execution of a program.
Declare and use variables and constants Variable A variable is a value that can change during the execution of a program. Constant A constant is a value that is set when the program initializes and does
More informationSorting. Task Description. Selection Sort. Should we worry about speed?
Sorting Should we worry about speed? Task Description We have an array of n values in any order We need to have the array sorted in ascending or descending order of values 2 Selection Sort Select the smallest
More informationSorting (Weiss chapter )
Sorting (Weiss chapter 8.1 8.3) Sorting 5 3 9 2 8 7 3 2 1 4 1 2 2 3 3 4 5 7 8 9 Zillions of sorting algorithms (bubblesort, insertion sort, selection sort, quicksort, heapsort, mergesort, shell sort, counting
More informationSORTING AND SEARCHING
SORTING AND SEARCHING Today Last time we considered a simple approach to sorting a list of objects. This lecture will look at another approach to sorting. We will also consider how one searches through
More informationComputer lab information. TAOP24, Advanced course on optimization
Linkping University April 26, 2017 Department of Mathematics Division of Optimization Oleg Burdakov Computer lab information TAOP24, Advanced course on optimization 1 General information Three computer
More informationHS STELLENBERG : DELPHI : FOKUS VIR EKSAMENS GEDATEER 1 FEB 2017.
D E L P H I F O K U S V I R E K S A M E N S ( F E B 2 0 1 7 ) P a g e 1 HS STELLENBERG : DELPHI : FOKUS VIR EKSAMENS GEDATEER 1 FEB 2017. Hierdie is n werksdokument en word van tyd tot tyd opgradeer. GRAAD
More information2.2 Data representation
An array is a data structure, which allows a set of items of identical data type to be stored together using the same identifier name. Arrays are declared in a similar way to standard variables, except
More informationMechatronics Laboratory Assignment 2 Serial Communication DSP Time-Keeping, Visual Basic, LCD Screens, and Wireless Networks
Mechatronics Laboratory Assignment 2 Serial Communication DSP Time-Keeping, Visual Basic, LCD Screens, and Wireless Networks Goals for this Lab Assignment: 1. Introduce the VB environment for PC-based
More informationNOTES: Procedures (module 15)
Computer Science 110 NAME: NOTES: Procedures (module 15) Introduction to Procedures When you use a top-down, structured program design, you take a problem, analyze it to determine what the outcome should
More informationComputer Science Spring 2005 Final Examination, May 12, 2005
Computer Science 302 00 Spring 2005 Final Examination, May 2, 2005 Name: No books, notes, or scratch paper. Use pen or pencil, any color. Use the backs of the pages for scratch paper. If you need more
More informationLAB 13: ARRAYS (ONE DIMINSION)
Statement Purpose: The purpose of this Lab. is to practically familiarize student with the concept of array and related operations performed on array. Activity Outcomes: As a second Lab on Chapter 7, this
More informationCE151-4-AU UNIVERSITY OF ESSEX. Sample Examination Questions 2011 INTRODUCTION TO PROGRAMMING
CE151-4-AU UNIVERSITY OF ESSEX Sample Examination Questions 2011 INTRODUCTION TO PROGRAMMING This paper contains questions from the first half of the CE112 papers from 2009 and 2010, adapted to Python.
More informationNATIONAL SENIOR CERTIFICATE GRADE 12
NATIONAL SENIOR CERTIFICATE GRADE 12 INFORMATION TECHNOLOGY P1 NOVEMBER 2017 MARKS: 150 TIME: 3 hours This question paper consists of 18 pages. Information Technology/P1 2 DBE/November 2017 INSTRUCTIONS
More informationCOT 5407: Introduction to Algorithms. Giri Narasimhan. ECS 254A; Phone: x3748
COT 5407: Introduction to Algorithms Giri Narasimhan ECS 254A; Phone: x3748 giri@cis.fiu.edu http://www.cis.fiu.edu/~giri/teach/5407s17.html https://moodle.cis.fiu.edu/v3.1/course/view.php?id=1494 8/28/07
More informationICAU1128B: Operate a Personal Computer Student Handbook
ICA20105 Certificate II in Information Technology ICAU1128B: Operate a Personal Computer Student Handbook Modification History Competency Handbooks ICA20105: Cert II in Information Technology: ICAU1128B
More informationYork University AS/AK/ITEC INTRODUCTION TO DATA STRUCTURES. Midterm Sample I. Examiner: S. Chen Duration: One Hour and 30 Minutes
York University AS/AK/ITEC 2620 3.0 INTRODUCTION TO DATA STRUCTURES Midterm Sample I Examiner: S. Chen Duration: One Hour and 30 Minutes This exam is closed textbook(s) and closed notes. Use of any electronic
More informationComputer Science E-119 Fall Problem Set 3. Due before lecture on Wednesday, October 31
Due before lecture on Wednesday, October 31 Getting Started To get the files that you will need for this problem set, log into nice.harvard.edu and enter the following command: gethw 3 This will create
More informationComputer Science 1 Ah
UNIVERSITY OF EDINBURGH course CS0077 COLLEGE OF SCIENCE AND ENGINEERING SCHOOL OF INFORMATICS Computer Science 1 Ah Resit Examination Specimen Solutions Date: Monday 1st September 2003 Time: 09:30 11:00
More informationHands-On-8 Advancing with VBA
Hands-On-8 Advancing with VBA Creating Event Procedures In this exercise you will create a message box that will display a welcome message to the user each time your database is opened. Before starting
More informationData Structures and Algorithms. Chapter 1
Data Structures Dr Ahmed Rafat Abas Computer Science Dept, Faculty of Computer and Information, Zagazig University arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Data Structures and Algorithms
More informationTechnical Note TN1026 Managing Groups and Users for Music Ace and Music Ace 2
1. Scope This technical note applies to all Music Ace and Music Ace 2 Educator versions, which include Single- Educator, Lab Pack and Network versions. For guidance managing groups and users for Music
More informationExcel VBA Variables, Data Types & Constant
Excel VBA Variables, Data Types & Constant Variables are used in almost all computer program and VBA is no different. It's a good practice to declare a variable at the beginning of the procedure. It is
More information2 Fundamentals of data structures
2.6 Hash tables Learning objectives: Be familiar with the concept of a hash table and its uses. Be able to apply simple hashing algorithms. Know what is meant by a collision and how collisions are handled
More informationOneDrive for Students. Pilot Information Pack
OneDrive for Students Pilot Information Pack Information for Students Your OneDrive for Business library will allow you to create, edit and save content at any time, on any device, and to share that content
More informationVBA 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 informationChapter 2.5 Writing maintainable programs
Chapter 2.5 Writing maintainable programs Good program writing techniques Maintenance is the updating of a program after it has been released. Maintenance will be helped when the programmer uses good programming
More informationVisual basic tutorial problems, developed by Dr. Clement,
EXCEL Visual Basic Tutorial Problems (Version January 20, 2009) Dr. Prabhakar Clement Arthur H. Feagin Distinguished Chair Professor Department of Civil Engineering, Auburn University Home page: http://www.eng.auburn.edu/users/clemept/
More informationAdvanced Prolog Programming
1 Introduction CIS335, Assignment 4 Advanced Prolog Programming Geraint Wiggins November 12, 2004 This practical is the second self-assessed exercise for MSc students on the Prolog module. It is intended
More informationTopics Applications Most Common Methods Serial Search Binary Search Search by Hashing (next lecture) Run-Time Analysis Average-time analysis Time anal
CSC212 Data Structure t Lecture 18 Searching Instructor: George Wolberg Department of Computer Science City College of New York @ George Wolberg, 2016 1 Topics Applications Most Common Methods Serial Search
More informationSection 2 Getting Started
Section 2 Getting Started ECDL Section 2 Getting Started By the end of this section you should be able to: Start, restart and close down a device Log on and log off Windows Recognise and use the Desktop
More informationCS 2113 Midterm Exam, November 6, 2007
CS 2113 Midterm Exam, November 6, 2007 Problem 1 [20 pts] When the following VBA program is executed, what will be displayed in the message box? Option Explicit Sub problem1() Dim m As Integer, n As Integer
More informationLearning VB.Net. Tutorial 19 Classes and Inheritance
Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you
More informationSAULT COLLEGE OF APPLIED ARTS & TECHNOLOGY SAULT STE MARIE, ON COURSE OUTLINE
SAULT COLLEGE OF APPLIED ARTS & TECHNOLOGY SAULT STE MARIE, ON COURSE OUTLINE Course Title: Introduction to Visual Basic Code No.: Semester: Three Program: Computer Programming Author: Willem de Bruyne
More informationModule 5. Databases. Astro Computer Training. Page 1
Module 5 Databases Astro Computer Training Page 1 1. Database Terminologies What is a Database? A database is a collection of data related to a particular topic organised and stored for easy retrieval.
More informationUnit 6 - Software Design and Development LESSON 3 KEY FEATURES
Unit 6 - Software Design and Development LESSON 3 KEY FEATURES Last session 1. Language generations. 2. Reasons why languages are used by organisations. 1. Proprietary or open source. 2. Features and tools.
More informationVCE Algorithmics (HESS)
VCE Algorithmics (HESS) Written examination End of year Sample questions SECTION A Multiple-choice questions Question 1 Consider the following pseudocode, written by Cecily, an Algorithmics student. Algorithm
More informationOverview: Requirements:
ONENOTE PROJECT DUE BEFORE CLASS BEGINS THE WEEK OF Overview: FEBRUARY 11, 2008 One of the main skills we want CIS 150 students to take away from this class is the ability to adapt to and be able to work
More informationReading and Writing Files. Keeping Data
Reading and Writing Files Keeping Data Why do we use files? For permanently storing data. For dealing with information too large to fit in memory. Sequential Access Files Think of files as being stored
More informationFinal: CSS 342 SAMPLE. Data Structures, Algorithms, and Discrete Mathematics I
Final: CSS 342 SAMPLE Data Structures, Algorithms, and Discrete Mathematics I This is a closed-book, closed-notes exam, except for a single sheet of letter-sized, double-sided hand-written notes. Total
More informationSorting. Weiss chapter , 8.6
Sorting Weiss chapter 8.1 8.3, 8.6 Sorting 5 3 9 2 8 7 3 2 1 4 1 2 2 3 3 4 5 7 8 9 Very many different sorting algorithms (bubblesort, insertion sort, selection sort, quicksort, heapsort, mergesort, shell
More informationVeco User Guides. Grids, Views, and Grid Reports
Veco User Guides Grids, Views, and Grid Reports Introduction A Grid is defined as being a list of data records presented to the user. A grid is shown generally when an option is selected from the Tree
More informationIntroduction to the C++ Programming Language
LESSON SET 2 Introduction to the C++ Programming Language OBJECTIVES FOR STUDENT Lesson 2A: 1. To learn the basic components of a C++ program 2. To gain a basic knowledge of how memory is used in programming
More information