Lab3: Dictionary Array

Size: px
Start display at page:

Download "Lab3: Dictionary Array"

Transcription

1 Lab3: Dictionary Array Due Date: Saturday, 14 Feb 2009 by midnight Background: In Lab2, we learned how to use a static 2D array of characters of max size around 172,000x32. The space required to store this file is around 5MB, definitely a waste of memory when most files are smaller than 172,000 words and most words and way smaller than 32 characters. In Lab3, we will implement the same dictionary structure, but via a dynamically allocated array of dynamically allocated char pointers. You will apply all that you have learned so far about arrays, pointers, passing pointers, malloc and free in this lab. WARNING: This is the first time you will be exposed to dealing with dynamic pointers. You must start this program early to make sure you can take care of all the debugging issues early on. This program will definitely take more than one afternoon of coding. Get started early. What You'll Need You will need lab3.c, dictlib.h and dictlib.c and dictlib-solution.o and solution(exe) to get started. You can copy them from the download site at /afs/andrew/course/15/123/downloads/lab3 You will need to carefully study the header file, dictlib.h and implement those functions in the dictlib.c for part 2 of the assignment. We will develop some demo code in class and recitations. It is important to understand that all the strings are hanging from the pointers in the array. Also pay attention to the syntax. Notice that when we wish to assign something into one of the pointers in the array we use (*array)[index] and that we MUST parenthesize (*array). Why? Start with the small input files first (in particular, you should use 10-words.txt to make sure basic functionality works before going on to write the double-capacity function, which you can then test with 105-words.txt and beyond.

2 Downloading Files: You can download files from from /afs/andrew/course/15/123/downloads/lab3 Assignment: This assignment is divided into two parts. In part 1, you will have to develop the main program that works with the provided dictlib-solution.o. This will give you the opportunity to develop the main program by using our dictionary library. First run our sample solution executable. To run the solution executable, follow the directions below. % chmod +x solution %./solution input/inputfile output/outputfile This will display the menu and try few things to see how they work. You may want to test this with a small file 10-words.txt so you can manually inspect output. Now develop your main program(lab3.c) to do the same thing. Understand how to use each function as listed in dictlib.h and develop the main program. You don t need to have the dictlib.c yet. We will test your main with the provided dictlib-solution.o Your program must do the following. 1. Load the Dictionary loadarray() function will open the input file, read in all the strings, and then close the input file. Your load must also update the wordcount. As you read in words from the file, keep the dictionary in sorted (lexical) order at all times. You may not load the entire array in original order and then call a sort afterwards. Keeping an array sorted in this manner is called insert-in-order. 2. Develop the Menu program After loading the dictionary into the array, you must call a menu() function that offers the user a list of operations to interact with the dictionary. The menu offered to the user should look something like this.

3 Choose: 'P'rint, 'S'earch, 'I'nsert, 'R'emove, 'C'ount, 'Q'uit : and the meaning of the options are: 'P'rint : A little bit of formatting required here: call printarray() to print out as many words as will fit on a 80 char line separated by a space, without going over 80 chars then go to the next line and repeat until all the words in the dictionary are printed. You may want to use a temporary buffer to do this. 'S'earch : Prompt for a word, e.g., foo, then call searchforword(). After returning from the call to searchforword() print something like: "foo found" OR "foo NOT found". 'I'nsert : Prompt for a word and insert it into the dictionary at the proper position to maintain order. Use insertword. Do not store duplicate words in the dictionary. This option should report back to the user something like "foo inserted" OR "foo ignored (duplicate)". 'R'emove: Prompt for a word then call removeone() to delete it. This option should report back to the user something like "foo removed" OR "foo ignored (not found)". Memory allocated for the word must be freed. 'C'ount : Prints the current wordcount to the console. 'Q'uit : Print message that program is ending and dictionary will be sent to the output file specified on command line. Then call savearray() to save the contents of the dictionary to the output file. It is to be saved in exactly the same format as the input file, i.e., one word per line You need to develop the menu and test that with the sample library dictlibsolution.o to compile your code use: % gcc ansi pedantic Wall lab3.c dictlib-solution.o o mysolution %./mysolution input/inputfile output/outputfile This should work exactly as with the output provided by our solution executable. Now you are ready to move on to part 2. Part 2 In this part, you will develop your own dictlib.c file that will produce the same outputs as produced by the dictlib-solution.o. The following functions must be developed. 1. /* loading from the input file */ int loadarray(char *infilename, char ***array, int *count, int *capacity); [10 pts] 2. /* searching for a specific word */ int searchforword(char **array, int count, char *response); [10 pts] 3. /* menu */ int menu(char ***array, int *count, int *capacity); [10 pts] 4. /* inserting a new word */ int insertword(char ***array, int *count, int *capacity, char word[]); [10 pts]

4 5. /* removing word */ int removeone(char **array, int *wordcount, char word[]); [10 pts] 6. /* saving the dictionary to a file*/ void savearray(char *filename, char **array, int count); [10 pts] 7. /* double size the array if there isn't enough space */ void darray(char ***array, int count, int *capacity); [10 pts] 8. /* free the entire array. We will be testing all free with valgrind */ void freeall(char **array, int count); [10 pts] 9. /* print the array and all its entries */ void printarray(char **array, int count); [10 pts] 10. Style points (style points are based on indentation, proper use of variable names, structure of your program, handin proper files etc. Your TA can provide more guidance on this. Please ask) [10 pts] DO NOT change the function prototypes as they will be tested from automated scripts. Main requirements for Lab 3 Do not use any additional data structures in your attempt to be clever/fast on the load. You should document your code as best you can. You should especially document anything that is "clever" or unusual. Do not write 2 different insert() functions. Just write one function that does not care whether the string came from the input file, or whether it came from the user in the 'I' menu function. The insert function itself should not write the found / not found message. Let it return a value and check the value after the call. This avoids console output during the initial load. Do not use strcpy to shuffle the words during insertion. Instead, copy the pointers! You must NEVER create any garbage. We will be using Valgrind. You will note that most function prototypes take addresses of variables from the calling program and manipulate the content directly. As such you have to deal with many * (a pointer), ** (a pointer to a pointer OR array of pointers) or *** (an address of an array of pointers). It is important to learn how to dereference various * s. For example, dereferencing an int* leads to an int, dereferencing int** leads to an int* and dereferencing int*** leads to a int** (or array of int* s) Be sure to come to class so you can learn all about *, **, and *** s Unlike the previous assignment, we do not allocate memory in advance. Memory is allocated as needed. Your initial allocation for the array should be space for 50 pointers. If the array ever gets full (i.e., wordcount equals current capacity), and there's a word to insert, you will double the

5 capacity of the array (i.e., malloc a new array of twice the current size, copy the strings over into the front half of the newly allocated array, and free the space used by the old array. This is what Java does when it runs out of room in an array. It is very important to free the old memory or otherwise, your program may run out of memory and seg fault. You are allowed to use other functions like calloc or realloc. Use Valgrind to make sure you have no memory leaks from this program Program Management through Source File Decomposition This is our first C program where we try to solve the problem by using multiple source (*.c) and header files (*.h). You MUST break up your source code into a main file and a pair of.h /.c files (e.g., dictlib.h and dictlib.c). You cannot change the prototypes given in dictlib.h. The main should only have the includes at the top and the main function below. All other function definitions should be in a separate.c file and their corresponding prototypes in a separate.h file (which must be protected correctly with an #ifndef). Compiling Code You MUSTcompile your source files separately. To compile main.c type > gcc -c ansi Wall pedantic lab3.c This will create the object file main.o. You are also asking the compiler to list all compiler warnings by using the flag Wall and pedantic. Be sure to remove all warnings before submission. To compile dictlib.c type > gcc -c ansi Wall dictlib.c This will creat the object file dictlib.o. Now to create the executable (called exec) you can type >gcc -o exec main.o dictlib.o. We strongly encourage you to create a makefile to automate the program management. We will discuss makefiles in class/recitations.

6 Data Files We are using the same data files as in Lab2 10-words.txt (test file of 10 words - use this first!) 105-words.txt (test file of 105 words) 42K-words.txt 172K-words.txt DON'T use this one until you are SURE you're done! Testing the program A general command to test the program looks as follows. You MUST test your program by typing./exec inputfile outfile. After input file is read, program will display the menu until user types 'Q' Testing for memory leaks Run valgrind after you are done with everything. % gcc g Wall pedantic ansi dictlib.c lab3.c % valgrind --tool=memcheck --leak-check=full./a.out inputfile outputfile Be sure that you remove all definitely lost error messages from valgrind output. Grading your program Grading Your program will be graded as follows The following grading criterion is strictly enforced for ALL assignments. 1. A program that does not compile - 0 points 2. A program that is 0-24 hours late max grade is 50%

7 3. A program that is hours late - max grade is 20% 4. A program that is more than 48 hours late 0 points 5. Only one late can be used per assignment (you have a total of 3 for the semester) See feedback.txt in the download folder to see the grading criteria used. Handing in your Solution For this assignment, all three files (main.c, dictlib.c, dictlib.h) should be in a zip file. Create the zip file first. >zip lab3.zip lab3.c dictlib.c dictlib.h >cp lab3.zip /afs/andrew.cmu.edu/course/15/123/handin/lab3/yourid to submit your zip file.

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists Lecture 11 Doubly Linked Lists & Array of Linked Lists In this lecture Doubly linked lists Array of Linked Lists Creating an Array of Linked Lists Representing a Sparse Matrix Defining a Node for a Sparse

More information

Lab Experience 17. Programming Language Translation

Lab Experience 17. Programming Language Translation Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly

More information

CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf

CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf First Name: Last Name: NetID: The purpose of this lab is to help you to better understand functions:

More information

CISC 181 Project 3 Designing Classes for Bank Accounts

CISC 181 Project 3 Designing Classes for Bank Accounts CISC 181 Project 3 Designing Classes for Bank Accounts Code Due: On or before 12 Midnight, Monday, Dec 8; hardcopy due at beginning of lecture, Tues, Dec 9 What You Need to Know This project is based on

More information

1 Abstract Data Types Information Hiding

1 Abstract Data Types Information Hiding 1 1 Abstract Data Types Information Hiding 1.1 Data Types Data types are an integral part of every programming language. ANSI-C has int, double and char to name just a few. Programmers are rarely content

More information

Opening a Command Shell

Opening a Command Shell Opening a Command Shell Win Cmd Line 1 In WinXP, go to the Programs Menu, select Accessories and then Command Prompt. In Win7, go to the All Programs, select Accessories and then Command Prompt. Note you

More information

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint) TN203 Porting a Program to Dynamic C Introduction Dynamic C has a number of improvements and differences compared to many other C compiler systems. This application note gives instructions and suggestions

More information

csce4313 Programming Languages Scanner (pass/fail)

csce4313 Programming Languages Scanner (pass/fail) csce4313 Programming Languages Scanner (pass/fail) John C. Lusth Revision Date: January 18, 2005 This is your first pass/fail assignment. You may develop your code using any procedural language, but you

More information

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3 Notepad++ The COMPSCI 101 Text Editor for Windows The text editor that we will be using in the Computer Science labs for creating our Python programs is called Notepad++ and http://notepad-plus-plus.org

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Project 4 DB A Simple database program

Project 4 DB A Simple database program Project 4 DB A Simple database program Due Date April (Friday) Before Starting the Project Read this entire project description before starting Learning Objectives After completing this project you should

More information

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment .i.-' `-. i..' `/ \' _`.,-../ o o \.' ` ( / \ ) \\\ (_.'.'"`.`._) /// \\`._(..: :..)_.'// \`. \.:-:. /.'/ `-i-->..

More information

Week 2 Practical Objects and Turtles

Week 2 Practical Objects and Turtles Week 2 Practical Objects and Turtles Aims and Objectives Your aim in this practical is: to practise the creation and use of objects in Java By the end of this practical you should be able to: create objects

More information

Leak Check Version 2.1 for Linux TM

Leak Check Version 2.1 for Linux TM Leak Check Version 2.1 for Linux TM User s Guide Including Leak Analyzer For x86 Servers Document Number DLC20-L-021-1 Copyright 2003-2009 Dynamic Memory Solutions LLC www.dynamic-memory.com Notices Information

More information

Creating and Using Master Documents

Creating and Using Master Documents Creating and Using Master Documents Title: Creating and Using Master Documents Version: 0.3 First edition: 09/04 Contents Overview...2 Acknowledgments...2 Modifications and updates... 2 Why use a master

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

GDB Tutorial. A Walkthrough with Examples. CMSC 212 - Spring 2009. Last modified March 22, 2009. GDB Tutorial

GDB Tutorial. A Walkthrough with Examples. CMSC 212 - Spring 2009. Last modified March 22, 2009. GDB Tutorial A Walkthrough with Examples CMSC 212 - Spring 2009 Last modified March 22, 2009 What is gdb? GNU Debugger A debugger for several languages, including C and C++ It allows you to inspect what the program

More information

Lab 1 Beginning C Program

Lab 1 Beginning C Program Lab 1 Beginning C Program Overview This lab covers the basics of compiling a basic C application program from a command line. Basic functions including printf() and scanf() are used. Simple command line

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

Assignment 09. Problem statement : Write a Embedded C program to switch-on/switch-off LED.

Assignment 09. Problem statement : Write a Embedded C program to switch-on/switch-off LED. Assignment 09 Problem statement : Write a Embedded C program to switch-on/switch-off LED. Learning Objective: -> To study embedded programming concepts -> To study LCD control functions -> How output is

More information

PA2: Word Cloud (100 Points)

PA2: Word Cloud (100 Points) PA2: Word Cloud (100 Points) Due: 11:59pm, Thursday, April 16th Overview You will create a program to read in a text file and output the most frequent and unique words by using an ArrayList. Setup In all

More information

CPS122 - OBJECT-ORIENTED SOFTWARE DEVELOPMENT. Team Project

CPS122 - OBJECT-ORIENTED SOFTWARE DEVELOPMENT. Team Project CPS122 - OBJECT-ORIENTED SOFTWARE DEVELOPMENT Team Project Due Dates: See syllabus for due dates for each milestone This project spans much of the semester, to be completed as a series of milestones, each

More information

How to Write a Simple Makefile

How to Write a Simple Makefile Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging

More information

10CS35: Data Structures Using C

10CS35: Data Structures Using C CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

More information

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html CS 259: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 319 8/19/2015 Install

More information

Illustration 1: Diagram of program function and data flow

Illustration 1: Diagram of program function and data flow The contract called for creation of a random access database of plumbing shops within the near perimeter of FIU Engineering school. The database features a rating number from 1-10 to offer a guideline

More information

The goal with this tutorial is to show how to implement and use the Selenium testing framework.

The goal with this tutorial is to show how to implement and use the Selenium testing framework. APPENDIX B: SELENIUM FRAMEWORK TUTORIAL This appendix is a tutorial about implementing the Selenium framework for black-box testing at user level. It also contains code examples on how to use Selenium.

More information

Lab 2: Swat ATM (Machine (Machine))

Lab 2: Swat ATM (Machine (Machine)) Lab 2: Swat ATM (Machine (Machine)) Due: February 19th at 11:59pm Overview The goal of this lab is to continue your familiarization with the C++ programming with Classes, as well as preview some data structures.

More information

Some Scanner Class Methods

Some Scanner Class Methods Keyboard Input Scanner, Documentation, Style Java 5.0 has reasonable facilities for handling keyboard input. These facilities are provided by the Scanner class in the java.util package. A package is a

More information

Creating Database Tables in Microsoft SQL Server

Creating Database Tables in Microsoft SQL Server Creating Database Tables in Microsoft SQL Server Microsoft SQL Server is a relational database server that stores and retrieves data for multi-user network-based applications. SQL Server databases are

More information

A Comparison of Programming Languages for Graphical User Interface Programming

A Comparison of Programming Languages for Graphical User Interface Programming University of Tennessee, Knoxville Trace: Tennessee Research and Creative Exchange University of Tennessee Honors Thesis Projects University of Tennessee Honors Program 4-2002 A Comparison of Programming

More information

Offline Image Viewer Guide

Offline Image Viewer Guide Table of contents 1 Overview... 2 2 Usage... 3 2.1 Basic...3 2.2 Example... 3 3 Options...5 3.1 Option Index... 5 4 Analyzing Results... 6 4.1 Total Number of Files for Each User...6 4.2 Files That Have

More information

Introduction to Data Structures

Introduction to Data Structures Introduction to Data Structures Albert Gural October 28, 2011 1 Introduction When trying to convert from an algorithm to the actual code, one important aspect to consider is how to store and manipulate

More information

Repetition Using the End of File Condition

Repetition Using the End of File Condition Repetition Using the End of File Condition Quick Start Compile step once always g++ -o Scan4 Scan4.cpp mkdir labs cd labs Execute step mkdir 4 Scan4 cd 4 cp /samples/csc/155/labs/4/*. Submit step emacs

More information

public static void main(string[] args) { System.out.println("hello, world"); } }

public static void main(string[] args) { System.out.println(hello, world); } } Java in 21 minutes hello world basic data types classes & objects program structure constructors garbage collection I/O exceptions Strings Hello world import java.io.*; public class hello { public static

More information

Lecture 22: C Programming 4 Embedded Systems

Lecture 22: C Programming 4 Embedded Systems Lecture 22: C Programming 4 Embedded Systems Today s Goals Basic C programming process Variables and constants in C Pointers to access addresses Using a High Level Language High-level languages More human

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage

More information

Installing Java. Table of contents

Installing Java. Table of contents Table of contents 1 Jargon...3 2 Introduction...4 3 How to install the JDK...4 3.1 Microsoft Windows 95... 4 3.1.1 Installing the JDK... 4 3.1.2 Setting the Path Variable...5 3.2 Microsoft Windows 98...

More information

Time Limit: X Flags: -std=gnu99 -w -O2 -fomitframe-pointer. Time Limit: X. Flags: -std=c++0x -w -O2 -fomit-frame-pointer - lm

Time Limit: X Flags: -std=gnu99 -w -O2 -fomitframe-pointer. Time Limit: X. Flags: -std=c++0x -w -O2 -fomit-frame-pointer - lm Judge Environment Language Compilers Language Version Flags/Notes Max Memory Limit C gcc 4.8.1 Flags: -std=gnu99 -w -O2 -fomit-frame-pointer - lm C++ g++ 4.8.1 Flags: -std=c++0x -w -O2 -fomit-frame-pointer

More information

Chapter 1: Getting Started

Chapter 1: Getting Started Chapter 1: Getting Started Every journey begins with a single step, and in ours it's getting to the point where you can compile, link, run, and debug C++ programs. This depends on what operating system

More information

Project 2: Bejeweled

Project 2: Bejeweled Project 2: Bejeweled Project Objective: Post: Tuesday March 26, 2013. Due: 11:59PM, Monday April 15, 2013 1. master the process of completing a programming project in UNIX. 2. get familiar with command

More information

Upgrading from Windows XP to Windows 7

Upgrading from Windows XP to Windows 7 Upgrading your PC from Windows XP to Windows 7 requires a custom installation which doesn't preserve your programs, files, or settings. It s sometimes called a clean installation for that reason. A custom

More information

1 Description of The Simpletron

1 Description of The Simpletron Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies

More information

edgebooks Quick Start Guide 4

edgebooks Quick Start Guide 4 edgebooks Quick Start Guide 4 memories made easy SECTION 1: Installing FotoFusion Please follow the steps in this section to install FotoFusion to your computer. 1. Please close all open applications prior

More information

Integrated Accounting System for Mac OS X

Integrated Accounting System for Mac OS X Integrated Accounting System for Mac OS X Program version: 6.3 110401 2011 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard Accounts is a powerful accounting system for Mac OS X. Text in square

More information

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders 1.00 Lecture 1 Course Overview Introduction to Java Reading for next time: Big Java: 1.1-1.7 Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

More information

Memory management. Announcements. Safe user input. Function pointers. Uses of function pointers. Function pointer example

Memory management. Announcements. Safe user input. Function pointers. Uses of function pointers. Function pointer example Announcements Memory management Assignment 2 posted, due Friday Do two of the three problems Assignment 1 graded see grades on CMS Lecture 7 CS 113 Spring 2008 2 Safe user input If you use scanf(), include

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

LAB 6: Code Generation with Visual Paradigm for UML and JDBC Integration

LAB 6: Code Generation with Visual Paradigm for UML and JDBC Integration LAB 6: Code Generation with Visual Paradigm for UML and JDBC Integration OBJECTIVES To understand the steps involved in Generating codes from UML Diagrams in Visual Paradigm for UML. Exposure to JDBC integration

More information

The Advantages of Dan Grossman CSE303 Spring 2005, Lecture 25

The Advantages of Dan Grossman CSE303 Spring 2005, Lecture 25 CSE 303: Concepts and Tools for Software Development Dan Grossman Spring 2005 Lecture 25 Memory-Management Idioms Dan Grossman CSE303 Spring 2005, Lecture 25 1 No tools or rule today Review: Java and C

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Create a report with formatting, headings, page numbers and table of contents

Create a report with formatting, headings, page numbers and table of contents Create a report with formatting, headings, numbers and table of contents MS Office Word 2010 Combine this model with instructions from your teacher and your report will be something you can be proud of.

More information

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming I (#494) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Software Design and Implementation - or, how to be a hacker

Software Design and Implementation - or, how to be a hacker Computer Science 50 Software Design and Implementation - or, how to be a hacker In what follows, we discuss the course overview, grading, books, weekly schedule, laboratory assignments, group projects

More information

8.5. <summary>...26 9. Cppcheck addons...27 9.1. Using Cppcheck addons...27 9.1.1. Where to find some Cppcheck addons...27 9.2.

8.5. <summary>...26 9. Cppcheck addons...27 9.1. Using Cppcheck addons...27 9.1.1. Where to find some Cppcheck addons...27 9.2. Cppcheck 1.72 Cppcheck 1.72 Table of Contents 1. Introduction...1 2. Getting started...2 2.1. First test...2 2.2. Checking all files in a folder...2 2.3. Excluding a file or folder from checking...2 2.4.

More information

LabVIEW Day 6: Saving Files and Making Sub vis

LabVIEW Day 6: Saving Files and Making Sub vis LabVIEW Day 6: Saving Files and Making Sub vis Vern Lindberg You have written various vis that do computations, make 1D and 2D arrays, and plot graphs. In practice we also want to save that data. We will

More information

6.s096. Introduction to C and C++

6.s096. Introduction to C and C++ 6.s096 Introduction to C and C++ 1 Why? 2 1 You seek performance 3 1 You seek performance zero-overhead principle 4 2 You seek to interface directly with hardware 5 3 That s kinda it 6 C a nice way to

More information

QUICK START BASIC LINUX AND G++ COMMANDS. Prepared By: Pn. Azura Bt Ishak

QUICK START BASIC LINUX AND G++ COMMANDS. Prepared By: Pn. Azura Bt Ishak QUICK START BASIC LINUX AND G++ COMMANDS Prepared By: Pn. Azura Bt Ishak FTSM UKM BANGI 2009 Content 1.0 About UBUNTU 1 2.0 Terminal 1 3.0 Basic Linux Commands 3 4.0 G++ Commands 23 1.0 ABOUT UBUNTU Ubuntu

More information

Contents. Microsoft Office 2010 Tutorial... 1

Contents. Microsoft Office 2010 Tutorial... 1 Microsoft Office 2010 Tutorial Contents Microsoft Office 2010 Tutorial... 1 Find your way through long documents with the new Document Navigation pane and Search... 4 Adjust the spaces between lines or

More information

Jonathan Worthington Scarborough Linux User Group

Jonathan Worthington Scarborough Linux User Group Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.

More information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 2, 2015 1 3 A First MaSH Program In this section we will describe a very

More information

This presentation explains how to monitor memory consumption of DataStage processes during run time.

This presentation explains how to monitor memory consumption of DataStage processes during run time. This presentation explains how to monitor memory consumption of DataStage processes during run time. Page 1 of 9 The objectives of this presentation are to explain why and when it is useful to monitor

More information

ECS 165B: Database System Implementa6on Lecture 2

ECS 165B: Database System Implementa6on Lecture 2 ECS 165B: Database System Implementa6on Lecture 2 UC Davis, Spring 2011 Por6ons of slides based on earlier ones by Raghu Ramakrishnan, Johannes Gehrke, Jennifer Widom, Bertram Ludaescher, and Michael Gertz.

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

Introduction to Eclipse

Introduction to Eclipse Introduction to Eclipse Overview Eclipse Background Obtaining and Installing Eclipse Creating a Workspaces / Projects Creating Classes Compiling and Running Code Debugging Code Sampling of Features Summary

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

AP Computer Science Java Mr. Clausen Program 9A, 9B

AP Computer Science Java Mr. Clausen Program 9A, 9B AP Computer Science Java Mr. Clausen Program 9A, 9B PROGRAM 9A I m_sort_of_searching (20 points now, 60 points when all parts are finished) The purpose of this project is to set up a program that will

More information

CS 241 Data Organization Coding Standards

CS 241 Data Organization Coding Standards CS 241 Data Organization Coding Standards Brooke Chenoweth University of New Mexico Spring 2016 CS-241 Coding Standards All projects and labs must follow the great and hallowed CS-241 coding standards.

More information

Automated Inventory System

Automated Inventory System Automated Inventory System User Manual Developed by USDA Food and Nutrition Service June 2009 (Incomplete) Table of Contents Welcome Menu Client Services Report System Inventory System Operations Tailgate

More information

Visual Studio 2008 Express Editions

Visual Studio 2008 Express Editions Visual Studio 2008 Express Editions Visual Studio 2008 Installation Instructions Burning a Visual Studio 2008 Express Editions DVD Download (http://www.microsoft.com/express/download/) the Visual Studio

More information

Chapter 13 Storage classes

Chapter 13 Storage classes Chapter 13 Storage classes 1. Storage classes 2. Storage Class auto 3. Storage Class extern 4. Storage Class static 5. Storage Class register 6. Global and Local Variables 7. Nested Blocks with the Same

More information

Lab 4: Socket Programming: netcat part

Lab 4: Socket Programming: netcat part Lab 4: Socket Programming: netcat part Overview The goal of this lab is to familiarize yourself with application level programming with sockets, specifically stream or TCP sockets, by implementing a client/server

More information

Programming Languages CIS 443

Programming Languages CIS 443 Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

Sequential Program Execution

Sequential Program Execution Sequential Program Execution Quick Start Compile step once always g++ -o Realtor1 Realtor1.cpp mkdir labs cd labs Execute step mkdir 1 Realtor1 cd 1 cp../0/realtor.cpp Realtor1.cpp Submit step cp /samples/csc/155/labs/1/*.

More information

ICS Technology. PADS Viewer Manual. ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com

ICS Technology. PADS Viewer Manual. ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com ICS Technology PADS Viewer Manual ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com Welcome to PADS Viewer Page 1 of 1 Welcome to PADS Viewer Welcome to PADS (Public Area

More information

Microsoft Windows PowerShell v2 For Administrators

Microsoft Windows PowerShell v2 For Administrators Course 50414B: Microsoft Windows PowerShell v2 For Administrators Course Details Course Outline Module 1: Introduction to PowerShell the Basics This module explains how to install and configure PowerShell.

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Figure 1: Graphical example of a mergesort 1.

Figure 1: Graphical example of a mergesort 1. CSE 30321 Computer Architecture I Fall 2011 Lab 02: Procedure Calls in MIPS Assembly Programming and Performance Total Points: 100 points due to its complexity, this lab will weight more heavily in your

More information

Table of Contents. Java CGI HOWTO

Table of Contents. Java CGI HOWTO Table of Contents Java CGI HOWTO...1 by David H. Silber javacgi document@orbits.com...1 1.Introduction...1 2.Setting Up Your Server to Run Java CGI Programs (With Explanations)...1 3.Setting Up Your Server

More information

CPSC 226 Lab Nine Fall 2015

CPSC 226 Lab Nine Fall 2015 CPSC 226 Lab Nine Fall 2015 Directions. Our overall lab goal is to learn how to use BBB/Debian as a typical Linux/ARM embedded environment, program in a traditional Linux C programming environment, and

More information

ECE 341 Coding Standard

ECE 341 Coding Standard Page1 ECE 341 Coding Standard Professor Richard Wall University of Idaho Moscow, ID 83843-1023 rwall@uidaho.edu August 27, 2013 1. Motivation for Coding Standards The purpose of implementing a coding standard

More information

C# and Other Languages

C# and Other Languages C# and Other Languages Rob Miles Department of Computer Science Why do we have lots of Programming Languages? Different developer audiences Different application areas/target platforms Graphics, AI, List

More information

5 Arrays and Pointers

5 Arrays and Pointers 5 Arrays and Pointers 5.1 One-dimensional arrays Arrays offer a convenient way to store and access blocks of data. Think of arrays as a sequential list that offers indexed access. For example, a list of

More information

Suite. How to Use GrandMaster Suite. Exporting with ODBC

Suite. How to Use GrandMaster Suite. Exporting with ODBC Suite How to Use GrandMaster Suite Exporting with ODBC This page intentionally left blank ODBC Export 3 Table of Contents: HOW TO USE GRANDMASTER SUITE - EXPORTING WITH ODBC...4 OVERVIEW...4 WHAT IS ODBC?...

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Expedite for Windows Software Development Kit Programming Guide

Expedite for Windows Software Development Kit Programming Guide GXS EDI Services Expedite for Windows Software Development Kit Programming Guide Version 6 Release 2 GC34-3285-02 Fifth Edition (November 2005) This edition replaces the Version 6.1 edition. Copyright

More information

A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming

A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming "The only way to learn a new programming language is by writing programs in it." -- B. Kernighan and D. Ritchie "Computers

More information

FileMaker 14. ODBC and JDBC Guide

FileMaker 14. ODBC and JDBC Guide FileMaker 14 ODBC and JDBC Guide 2004 2015 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and FileMaker Go are trademarks of FileMaker,

More information

Introduction. How does FTP work?

Introduction. How does FTP work? Introduction The µtasker supports an optional single user FTP. This operates always in active FTP mode and optionally in passive FTP mode. The basic idea of using FTP is not as a data server where a multitude

More information

PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC QUESTION BANK PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

More information

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor Vim, Emacs, and JUnit Testing Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor Overview Vim and Emacs are the two code editors available within the Dijkstra environment. While both

More information

Running your first Linux Program

Running your first Linux Program Running your first Linux Program This document describes how edit, compile, link, and run your first linux program using: - Gnome a nice graphical user interface desktop that runs on top of X- Windows

More information

1.2 Using the GPG Gen key Command

1.2 Using the GPG Gen key Command Creating Your Personal Key Pair GPG uses public key cryptography for encrypting and signing messages. Public key cryptography involves your public key which is distributed to the public and is used to

More information

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Programming System Design. CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

Python for Series 60 Platform

Python for Series 60 Platform F O R U M N O K I A Getting Started with Python for Series 60 Platform Version 1.2; September 28, 2005 Python for Series 60 Platform Copyright 2005 Nokia Corporation. All rights reserved. Nokia and Nokia

More information

Upgrading from Windows XP to Windows 7

Upgrading from Windows XP to Windows 7 We highly recommend that you print this tutorial. Your PC will restart during the Windows 7 installation process, so having a printed copy will help you follow the steps if you're unable to return to this

More information

SQL Injection Attack Lab Using Collabtive

SQL Injection Attack Lab Using Collabtive Laboratory for Computer Security Education 1 SQL Injection Attack Lab Using Collabtive (Web Application: Collabtive) Copyright c 2006-2011 Wenliang Du, Syracuse University. The development of this document

More information