CIS 199 Test 01 Review.

Slides:



Advertisements
Similar presentations
Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
Advertisements

Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Introduction to C Programming
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
Tutorial 11 Using and Writing Visual Basic for Applications Code
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
CIS 200 Final Review. New Material Data Structures.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
CISC105 General Computer Science Class 1 – 6/5/2006.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
1 Chapter 4: Selection Structures. In this chapter, you will learn about: – Selection criteria – The if-else statement – Nested if statements – The switch.
Introduction to Computer Systems and the Java Programming Language.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
Internal Lab Registeration labreg/lab/signup.aspxhttp:// labreg/lab/signup.aspx
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
CIS 199 Final Review. New Material Structures  Value type  NOT a reference type!  Used to encapsulate small groups of related variables.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
CIS 199 Final Review. New Material Classes  Reference type  NOT a value type!  Can only inherit from ONE base class.
Introduction to Object-Oriented Programming Lesson 2.
Programming with Microsoft Visual Basic th Edition
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
CIS 200 Test 01 Review. Built-In Types Properties  Exposed “Variables” or accessible values of an object  Can have access controlled via scope modifiers.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Sudeshna Sarkar, IIT Kharagpur 1 Programming and Data Structure Sudeshna Sarkar Lecture 3.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
C++ for Engineers and Scientists Second Edition Chapter 4 Selection Structures.
Chapter 1: Introduction to Computers and Programming
Information and Computer Sciences University of Hawaii, Manoa
BASIC PROGRAMMING C SCP1103 (02)
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 10 Programming Fundamentals with JavaScript
CIS 199 Test 01 Review.
Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development.
Static data members Constructors and Destructors
Learning to Program D is for Digital.
Topics Introduction Hardware and Software How Computers Store Data
CIS 200 Test 01 Review.
Objectives You should be able to describe: Interactive Keyboard Input
BASIC PROGRAMMING C SCP1103 (02)
Object Oriented Programming
Testing and Debugging.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Debugging and Random Numbers
Java programming lecture one
C++ Programming: From Problem Analysis to Program Design
Chapter 1: Introduction to Computers and Programming
Chapter 10 Programming Fundamentals with JavaScript
Selection CIS 40 – Introduction to Programming in Python
Variables Numbers can be stored and retrieved while a program is running if they are given a home. The way that integers and decimal numbers are stored.
Topics Introduction Hardware and Software How Computers Store Data
CIS 199 Test 02 Review.
Logical Computer System
Focus of the Course Object-Oriented Software Development
Boolean Expressions to Make Comparisons
CIS 199 Final Review.
COP 3330 Object-oriented Programming in C++
Introduction to Programming
CIS 199 Test 1 Review.
ICS103 Programming in C 1: Overview of Computers And Programming
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

CIS 199 Test 01 Review

Computer Hardware Central Processing Unit (CPU) Main Memory (RAM) Brains Operations performed here Main Memory (RAM) Scratchpad Work area for programs, process, temporary data Secondary Storage Hard drive Flash drive CD, DVD

Input, Output Devices Input Output Takes data IN Keyboard, Mouse, Game Controller, Microphone Output Pushes, places data OUT Display, Speakers, Printers

Programs and Digital Data Operating Systems. Microsoft Office, Web browsers Instructions read by CPU and processed Digital Data 1’s 0’s …forms binary (base 2)

Built-In Types

Properties Exposed “Variables” or accessible values of an object Can have access controlled via scope modifiers When thinking of properties: Values and definitions “get” – Code to run before returning a value “set” – Code to run before updating a value Can be used for validation and other processing actions “value” is a keyword in “set”

Methods Actions, code to be executed May return a value, may take value (not required) Can be controlled via scope keywords Can be static

Scope “private” – Can only be accessed by the class, object itself “protected” – Can only be accessed by the class, object, or any child classes, objects “public” – Available access for all

Named Constants AVOID MAGIC NUMBERS! Allows for reference across similar scope Change once, changes everywhere

Conditional Logic if(expression) else if(expression) else If ‘expression’ is true If not true, skipped else if(expression) Can be used to ‘chain’ conditions Code runs if ‘expression’ is true else Code to execute if ‘expression’ false Statements can be nested

Relational Operators X > Y X >= Y X < Y X <= Y X == Y > Greater than < Less than >= Greater than OR equal to <= Less than OR equal to == Equal to != NOT equal to X > Y X >= Y X < Y X <= Y X == Y X != Y

Operator Precedence (Highest) ++, --, ! * / % + - < > <= >= == != && || = *= /= %= += -= (Lowest) Detailed from: http://msdn.microsoft.com/en-us/library/2bxt6kc4%28v=vs.100%29.aspx

Comparing Strings You can use You cannot use You SHOULD use: ==, != You cannot use >, >=, <, <= You SHOULD use: String.Compare(s1, s2) s1 > s2 Returns positive Number s1 = s2 Returns zero s1 < s2 Returns negative number Compares the unicode value of EACH character

Exceptions and Exception Handling Exceptions are… “Exceptional” events Unexpected events, errors during runtime Unhandled exceptions? Stack trace and application death Handled with try/catch/finally blocks Try block “attempts” to run the code in question Catch block handles the exception(s) that may occur Finally block, optional, always executes

Accepting User Inputs: GUI

Accepting User Input: Console

Sample Questions from Blackboard Wiki

What does ‘WYSIWYG’ stand for? You See Is Get

GroupBox Vs Panel GroupBoxes have: Panels have: Group Title Scroll bar Border styling options

What is the difference between a high-level and a low-level language? Little to no ‘abstraction’ from the hardware or computer “Close to the hardware” Simple, but Difficult to use Machine code, assembly, C (in some cases) High-Level Very strong ‘abstraction’ from the hardware or computer “Far from the hardware” Easier to use, abstraction adds complexity C++, Java, C#, Python

How is the lifetime of a FIELD different from a lifetime of LOCAL variable? Fields are members of their containing type Fields can be used everywhere with appropriate scope Local variables can be used only in their “local” environment

What two things does a variable declaration specify about a variable? Type Identifier TYPE IDENTIFIER

Describe ‘&&’ and ‘||’ and how they work. Returns true if conditions are ALL true “If you do well on the test AND the quiz, you will earn a great grade!” || (OR) Returns true if ANY conditions are true “You can run a mile OR walk two miles (possible do both!)”

Why is ‘TryParse’ more effective than ‘Parse’? Less code No try / catch required

What is the difference between a SIGNED an UNSIGNED int?

What is the difference between syntax errors and logic errors? Syntax Errors – Errors that prevent compilation or other factors that prevent successful compilation striing myString = string.Empty; // Won’t compile, syntax error Logic Errors – Errors that occur during runtime, such as incorrect comparison or other unexpected behavior If(grade > 60) { Code if grade is F } // Incorrect operator used

What are the “Five logical units”? CPU – Processing, instructions Memory – Scratch pad, working space (Temporary) Secondary Storage – Hard drives, storage (Long term) Input – Keyboards, Mice, Controllers Output – Monitors, Speakers, Printers

Explicit type conversion? Why and how? Variables must be used for a single type never change Move from one type to another, must cast EXPLICIT cast / type conversion Aware of information loss

Write a code fragment that will display “Good Job” when int variable score is 80 or more, “OK” when score is 70 – 79, and “Needs Work” for any score under 70.

Write a code fragment that will apply a 10% discount to the value in double variable total when int variable numItems is 5 or more and int variable zone is 1, 3 or 5.

Class Vs Objects A Class can be described as a logical collection of attributes and behaviors (methods) that describe how a group of objects “look” and behave. An object is an instance of a class. Classes can be viewed as templates from which objects are created e.g. building plan (class)  houses (object) The objects from a class can share the same features and structures but can differ in implementation and use e.g. Car (Class)  RedCar (object 1), BlueCar (object 2), SilverFastCar (object 3), SilverSlowCar (object 4) class Car RedCar = new Car(“Red”, 90.0); //object 1 Car BlueCar = new Car(“Blue”, 90.0); //object 2 Car SilverFastCar = new Car(“Silver”, 100.0); //object 3 Car SilverSlowCar = new Car(“Silver”, 20.0); //object 4 Car Color MaxSpeed Accelerates() Attributes method

How can REACH further help you today? Ask Questions Now! Need to see an Example? Need to see a concept again? Need additional help? Visit us at: iTech Zone CRC (Ekstrom Library) Monday-Thursday 8:00am – 8:00pm Friday 8:00am – 4:00pm Sunday 12:00pm – 2:00pm (CRC Only)