Essential Java for AP CompSci: From Programming to Computer Science

Book description

Gain the essential skills for computer science using one of today's most popular programming languages, Java. This book will prepare you for AP CompSci Complete, but you don’t need to be sitting that class to benefit. Computer science has become a basic life skill that everyone is going to need to learn. Whether you are going into a career or side hustle in business, technology, creativity, architecture, or almost any other field, you will find coding and computer science play a role. 

So when we learn programming we are going to focus on three things: what is the process; what is the syntax; and what is the flow. The process is represented as a flowchart. We will learn how to make these to help you plan out what you are going to do before you write a line of code. At first, the flowcharts will be pretty simple, but then they will get more complex. The syntax is the code: this is what you write that translates the process you create in a flowchart to the instructions that the computer can understand. Finally, there is the flow. This is where you trace through the code and see how the data and information it stores along the way changes. You can see how the operation of the program cascades from line to line. You will be building charts that will capture the programming flow so you can better understand how the computer processes code to make your next program easier to conceive and code.

Along the way to aid in the learning of the essential Java skills, there will be three kinds of project types throughout this book: business software projects for applications where you work for a company and need to complete an internal project for a team such as the sales, marketing, or data science teams; social good projects where you are working for non-profits or for agencies that are trying to research and provide solutions to economic, environmental, medical, or humanitarian projects; and game development projects for games based on player input, random chance, or other mechanics for the use of entertainment.

What is unique about computer science is how it has become a skill, and not just a career. While there are jobs and titles of “computer scientist”, the skill of computer science, and specifically programming, are almost everywhere. After reading and using this book, you'll have the essential skills to think like a computer scientist, even if you are not. As a result you’ll be of greater value to your clients, your company, and yourself.  

What You Will Learn

    Discover the primary building blocks of programming using the Java programming language
  • See terminology and best practices of software development
  • Work with object-oriented programming concepts
  • Use common-language definitions and examples to help drive understanding and comprehension of computer science fundamentals

Who This Book Is For

Those who want to learn programming and want to think like a computer scientist. Ideal for anyone taking AP CompSci Complete.

Table of contents

  1. Cover
  2. Front Matter
  3. 1. Introduction
  4. 2. Setting Up the Java JDK and IntelliJ
  5. 3. Setting Up GitHub
  6. 4. Programming Languages
  7. 5. History and Uses of Java
  8. 6. How Java Works
  9. 7. Flowcharting
  10. 8. Hello, World
  11. 9. Simple Java Program Structure
  12. 10. Text Literals and Output
  13. 11. Value Literals
  14. 12. Output Formatting
  15. 13. Comments and Whitespace
  16. 14. Abstraction of Numbers
  17. 15. Binary
  18. 16. Unicode
  19. 17. Variables
  20. 18. Math!
  21. 19. Math Methods
  22. 20. Managing Type
  23. 21. Random Numbers
  24. 22. Capture Input
  25. 23. Creating Trace Tables
  26. 24. Methods
  27. 25. Calling Methods Within Methods
  28. 26. Methods and Values
  29. 27. Methods and Scope
  30. 28. Boolean Values and Equality
  31. 29. Simple Conditional Statements
  32. 30. Matching Conditions with the switch Statement
  33. 31. The Ternary Operator
  34. 32. The Stack and the Heap
  35. 33. Testing Equality with Strings
  36. 34. Dealing with Errors
  37. 35. Documenting with JavaDoc
  38. 36. Formatted Strings
  39. 37. The while Loop
  40. 38. Automatic Program Loops
  41. 39. The do/while Loop
  42. 40. Simplified Assignment Operators
  43. 41. The for Loop
  44. 42. Nesting Loops
  45. 43. Strings as Collections
  46. 44. Make Collections Using Arrays
  47. 45. Creating Arrays from Strings
  48. 46. Multidimensional Arrays
  49. 47. Looping Through Multidimensional Arrays
  50. 48. Beyond Arrays with ArrayLists
  51. 49. Introducing Generics
  52. 50. Looping with ArrayLists
  53. 51. Using for…each Loops
  54. 52. The Role-Playing Game Character
  55. 53. Polymorphism
  56. 54. Make All the Things…Classes
  57. 55. Class, Extend Thyself!
  58. 56. I Don’t Collect Those; Too Abstract
  59. 57. Access Denied: Protected and Private
  60. 58. Interfacing with Interfaces
  61. 59. All I’m Getting Is Static
  62. 60. An All-Star Cast, Featuring Null
  63. Back Matter

Product information

  • Title: Essential Java for AP CompSci: From Programming to Computer Science
  • Author(s): Doug Winnie
  • Release date: July 2021
  • Publisher(s): Apress
  • ISBN: 9781484261835