Card Set Information

2015-02-06 14:42:02
Diane cs140
Diane cs140 intro
Show Answers:

  1. Digital computers represent all data (numbers, letters, words, sounds, images, movies and programs) _________.
    numerically, in binary
  2. What is a bit?
    A single 0 or 1 (in a base 2 number system)
  3. What is a byte?
    A collection of 8 bits (2^8 possible values - why?)
  4. Computer Science is about _____________.
    problem solving. We're trying to find a general solution to the problem and write it in program code.
  5. What are the 5 steps of problem solving?
    • Understanding the problem
    • Finding a solution (correct, usable, fast enough)
    • Implementation
    • Documentation
    • Maintenance
  6. Programming involves 3 steps:
    • Design of an algorithm
    • Coding
    • Testing
  7. A variable is
    • A name
    • for a place
    • to store a value
    • of some type
  8. 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
  9. 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
  10. 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.
  11. What is the minimum number of times the code within a top-tested loop may execute?
  12. What is the minimum number of times the code within a bottom-tested loop may execute?
  13. Review example flowcharts from class.
  14. 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.
  15. 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)
  16. Describe structural code.
    Structural code establishes the organizational structure of programs and classes. It is designed using UML (Unified Modeling Language) class diagrams.
  17. 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).
  18. 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.
  19. 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)