Friday, June 5, 2020

Introduction to Computer Science using Java

Introduction to Computer Science using Java

Revised and Expanded, July 2003

Bradley Kjell, Central Connecticut State University

This is a first course in Computer Science using the programming language Java. It covers the fundamentals of programming and of computer science.
For maximum benefit, go though these notes interactively, thinking about and answering the question at the bottom of each page. There are about 15 pages per chapter. If you spend about 3 minutes per page each chapter will take about 45 minutes; much more, if you copy and run some of the programs. If you are a beginning programmer, plan on spending more than a month with this.
These notes assume that you have the Java Development Kit (JDK) version 1.3 or later from Sun (http://www.javasoft.com) and a text editor such as NotePad. They may be used with more sophisticated environments, as well. For more about these notes check the frequently asked questions.
Best viewed at 800 x 600

Part 1: Hardware and Software

General computer science topics. Hardware and software. Analog and binary signals. Machine language and high level languages. Language translation and interpretation.
 
 Chapter 1Introduction to Computer SystemsQuizFlash Cards.
 Chapter 2Analog and Binary SignalsQuizFlash Cards.
 Chapter 3Computer MemoryQuizFlash Cards.
 Chapter 4The ProcessorQuizFlash Cards.
     

Part 2: Running Java Programs

How to run Java programs. Translating Java source code into bytecodes. How bytecodes are interpreted. How to create a Java program.
 
 Chapter 5Introduction to JavaReview. 
 Chapter 6Small Java ProgramsReview. 
 Chapter 7How to Run the Example ProgramsReview. 
     

Part 3: Java Programming

How to program in Java.
 
 Chapter 8Primitive Data TypesQuizProgramming Exercises
    Flash Cards
 Chapter 9AVariables and the Assignment StatementQuizProgramming Exercises 
 Chapter 9BExpressions and Arithmetic OperatorsQuizProgramming Exercises 
 Chapter 10Input and OutputReviewProgramming Exercises 
 Chapter 11Floating Point InputReviewProgramming Exercises 
 Chapter 12The if StatementQuizProgramming Exercises 
 Chapter 13The Single Branch if StatementQuizProgramming Exercises 
 Chapter 14Boolean ExpressionsReviewProgramming Exercises 
 Chapter 15Loops and the while statementReviewProgramming Exercises 
 Chapter 16Counting LoopsQuizProgramming Exercises 
 Chapter 17Examples of Counting LoopsReviewProgramming Exercises 
 Chapter 18Sentinel-controlled LoopsReviewProgramming Exercises 
 Chapter 19Result-controlled LoopsQuizProgramming Exercises 
 Chapter 20Example Program -- Combination LockReviewProgramming Exercises 
 Chapter 21File Input and OutputReviewProgramming Exercises 
 Chapter 22Reading Data from a FileReviewProgramming Exercises 
 Chapter 23File Input Techniques Programming Exercises 
     

Part 4: Object Oriented Programming

Object Oriented programming. Software objects.
 
 Chapter 25 ObjectsQuiz 
 Chapter 26Object ReferencesQuiz 
 Chapter 27More about Objects and ClassesReview 
 Chapter 28Method ParametersReview 
 Chapter 29Strings and Object ReferencesQuizProgramming Exercises
 Chapter 30Defining your own ClassesReview    Programming Exercises
 Chapter 31Class Design Example (miles per gallon)ReviewProgramming Exercises
 Chapter 32Class Design Example (checking account)Review 
 Chapter 33Encapsulation and Visibility ModifiersQuizProgramming Exercises
 Chapter 34AParameters, Overloading, Local VariablesReview 
 Chapter 34BObject ParametersQuiz 
 Chapter 35Objects that Contain ObjectsReviewProgramming Exercises
     

Part 5: Applets and Graphics

 Chapter 36 AppletsQuiz    Programming Exercises
 Chapter 37 Applet ExamplesQuizProgramming Exercises
 Chapter 38 More Applet ExamplesQuizProgramming Exercises
 

Part 6: More Java Programming Features

Incrementing and decrementing variables. Convenient ways to create loops.
 
 Chapter 39 Increment, Decrement, and Assignment OperatorsQuiz     
 Chapter 40 Boolean Expressions and Short-circuit OperatorsReview     
 Chapter 41 The for StatementQuiz    Programming Exercises
 Chapter 42 More about the for StatementQuiz    Programming Exercises
 Chapter 43 The Conditional Operator, and the switch StatementQuiz    Programming Exercises
 Chapter 44 The do StatementQuiz    Programming Exercises
 Chapter 46 Introduction to ArraysQuiz    Programming Exercises
 Chapter 47 Common Array AlgorithmsQuiz    Programming Exercises
 Chapter 48 Arrays as ParametersReview     
 Chapter 49A Methods that Change ArraysQuiz     
 Chapter 49B Arrays of Objects and Linear SearchQuiz    Programming Exercises
 Chapter 49C Two-dimensional ArraysQuiz    Programming Exercises
 Chapter 49D StringBuffers and StringTokenizersQuiz    Programming Exercises
 

Part 7: Advanced Object Oriented Programming

Advanced features of object oriented programming.
 
 Chapter 50 Introduction to InheritanceQuiz     
 Chapter 51 Abstract Classes and PolymorphismQuiz     
 Chapter 52 More about PolymorphismQuiz     
 Chapter 53 InterfacesQuiz     
 Chapter 54 Vectors and EnumerationsQuiz     
 

Part 8: Graphical User Interface Programming

Graphical user interfaces. Project Swing and the Abstract Windowing Toolkit.
 
 Chapter 55 Introduction to GUI ProgrammingQuiz     
 Chapter 56 Swing FramesQuiz     
 Chapter 57 Event ListenersQuiz     
 Chapter 58 Adding Buttons to a FrameQuizProgramming Exercises
 Chapter 59Buttons and Action EventsQuiz    Programming Exercises    
 Chapter 60 Swing Text Fields and LabelsQuiz    Programming Exercises    
 Chapter 61 Components LayoutQuiz    Programming Exercises    
 Chapter 62 JPanel and BoxLayout  
 Chapter 63 Radio Buttons and BorderLayout Programming Exercises    
 Chapter 64 Sliders and Change Events Programming Exercises    
 

Part 9: Recursion

Recursion in problems, recursion in Java, recursion in graphics.
 
 Chapter 70 Introduction to RecursionQuiz     
 Chapter 71 Recursion in JavaQuiz    Programming Exercises
 Chapter 72 Examples of RecursionQuiz    Programming Exercises
 Chapter 73 More RecursionQuiz    Programming Exercises
 Chapter 74 Recursion with Graphics   Programming Exercises
 

Part 10: Exceptions and IO Streams

Exceptions. Disk file input and output.
 
 Chapter 80 Exceptions and ErrorsQuiz    Programming Exercises
 Chapter 81 More about ExceptionsQuiz    Programming Exercises
 Chapter 82 Input and Output StreamsQuiz       
 Chapter 83 Writing Text FilesQuiz    Programming Exercises
 Chapter 84 Reading Text FilesQuiz    Programming Exercises
 Chapter 85 Writing Binary FilesQuiz    Programming Exercises
 Chapter 86 Reading Binary FilesQuiz    Programming Exercises
 Chapter 87 The File ClassQuiz    Programming Exercises

Appendix

Index



No comments:

Post a Comment