Home > Flashcards > Print Preview
The flashcards below were created by user
on FreezingBlue Flashcards. What would you like to do?
Digital computers represent all data (numbers, letters, words, sounds, images, movies and programs) _________.
numerically, in binary
What is a bit?
A single 0 or 1 (in a base 2 number system)
What is a byte?
A collection of 8 bits (2^8 possible values - why?)
Computer Science is about _____________.
problem solving. We're trying to find a general solution to the problem and write it in program code.
What are the 5 steps of problem solving?
- Understanding the problem
- Finding a solution (correct, usable, fast enough)
Programming involves 3 steps:
- Design of an algorithm
A variable is
- A name
- for a place
- to store a value
- of some type
Describe 3 ways to design before coding:
- 1) flowcharts - action design using statements, branching, repetition, etc
- 2) pseudo code - algorithm expressed in normal language
- 3) UML diagrams - structural design
Describe the five basic elements of flowcharts.
- 1) Start - represented by oval
- 2) Stop - represented by oval
- 3) Order of activities - represented by arrow (or line)
- 4) Statements - actions taken in the program - represented by rectangle
- 5) Decisions - where a path choice is made in the program - represented by a diamond - often used in loops
What is a statement?
A statement is an instruction for the computer to follow. Statements can be used to input, read, or get a value, print, display values, assign values to variables, perform algebra with variables, storing results in variables.
What is the minimum number of times the code within a top-tested loop may execute?
What is the minimum number of times the code within a bottom-tested loop may execute?
Review example flowcharts from class.
In programming we frequently use abstraction to solve problems. What is abstraction?
Abstraction is representing only the relevant aspects of the real world. We accomplish this by leaving out extraneous properties of a complex object, and by abstracting general common properties of instances.
Java is an object-oriented programming language. What does this mean?
- 1) real-world objects are represented by programming 'objects'
- 2) a programming object is composed of DATA VALUES and ACTIONS (changes to the data values)
Describe structural code.
Structural code establishes the organizational structure of programs and classes. It is designed using UML (Unified Modeling Language) class diagrams.
Define a class.
A class is the structure of an object. It includes values and actions. It is the pattern for a type of object (the cookie cutter).
Define an object.
An object is an instance of a class. Each object has its own copy of instance variables. Each can do the actions defined in the class in a running program.
A NetBeans Project (program) includes the following (in hierarchical order):
- Package (collection of classes)
- Class (a name for a collection of values and a collection of methods)
- Method (the actions in a class)
- Statements (the individual actions of a method)