We may earn an affiliate commission when you visit our partners.
Course image
Udemy logo

Java Programming Essentials

AP Computer Science A

Eric Chou

[CS 22]

[Please watch all preview videos before signing up this course]

Read more

[CS 22]

[Please watch all preview videos before signing up this course]

This course covers the first of AP Computer Science which includes complete introduction for Java programming.  The course is suitable for people who are seeking for a on-line class for introduction to Java programming, who is preparing for AP Computer Science Exam in high school and who want to sharpen their knowledge in Java.

This part 1 course includes elementary programming in Java, program structures, OOP, and basic data structures. This course revolutionize the way computer science is taught.  Instead of teaching textbook chapter by chapter.

This course will be focused on an example program in each lecture.  Lucid big idea in computer science will be introduced by the example program. It is followed by explanation of Java syntax and other language features.  Practice questions, quizzes, and programming exercises will be given thereafter to enhance the understanding of the idea and to help to improve programming efficiency and test scores.

A spiral study model is suggested for student to build up good programming habits and shorten learning cycles in programming.

I would proudly say that this is one of the best Java Programming course on-line ever.

In this course, you will get:

(1) On-line lectures (with .pdf slides)

(2) sample programs (in Java)

(3) Quiz and exams (in multiple choice format) with solution

(4) AP format exam with solution.

(5) Free-online textbook access.

(6) Free on-line related information links and book chapters.

(7) Demo programs

(8) Lab projects

(9) Chapter projects.

(10) Facebook Q&A support and Gmail responses.

Enroll now

What's inside

Learning objectives

  • Learn essential java programming skills and master big ideas in computer science
  • Learn how to do programming and analyze a program
  • Get prepared for ap computer science exam, and work toward a perfect score 5

Syllabus

What are the topics for Java Language? How will a student be tested in AP Computer Science Exam.

Brief Introduction for Instructor and the teaching philosophy.

Read more

Overview of AP Computer Science Course as a whole. It also includes the table of contents for part 2 and part 3. Provide readers a good big picture of what to expect in the course. The slides (.pdf file) is also made downloadable.

Provides information for what materials are available in this course, how to make your own overall study plan for various purposes, and how to organize a study plan for each lecture.

Think Java: Companion book for this course. 

Extra-practices by the University of Washington. 

Introduce basic concepts about computer science, programming, computer and Java programming language. Guide audience to install BlueJ software and other IDEs. Create first simple program and Habits.

Abacus is an ancient tool for calculation. It is still used widely for training of mental calculation. It is also a good example to show how computation can be mapped to a very simple hardware (abacus: beams and beads). In this lecture, we use abacus to explain computation, hardware, programming language and programs.

Introduction to computer science from different view points: digital system, hardware, software, operation system, programming language and problem solving. 

Short overview of Java Development Kit, JRE, Java Virtual Machine, Java API and Java IDE. The purpose is to give audience the first impression of these terms but not the details of how they works. So, don't get scared if you do not fully understand what it is. We will return to them over and over again.

Show the internet resources available for eC Learning Channel by Dr. Eric Chou to support this course. 

My Udemy: https://www.udemy.com/user/eric-chou/

Youtube channel: https://www.youtube.com/channel/UCXGHpbLr9O5GydD0Ja9C7Nw

Facebook: https://www.facebook.com/profile.php?id=100007999848206

Quora: https://www.quora.com/profile/Eric-Chou-21 

Twitter: https://twitter.com/eCwarlephant

Email: [email protected]

Show student the resources and other educational materials provided by the Lecturer.  To guide student to learn Programming step by step. 

Discuss programming languages used in different system level (machine language, assembly language, and high-level programming language). Also discuss the history and trends of programming language.

Demonstrate how to install Java Development Kit (JDK 8) and Integrated Development Environment (Eclipse and BlueJ). We use BlueJ as our default tool. Please also download the PeaZip program if you do not have proper compression/de-compression program. (In this course, we use BlueJ as the main development IDE.) If you want to use Eclipse, please download

Total_Beginner_Companion_Document.pdf

file.

You may also find PeaZip tool to be useful when you need to download a zipped source code file (.zip).

Demonstrate the advantages of BlueJ as the first Integrated IDE for beginning students.

A simple program, HelloWorld.java, is presented. In this lecture, this simple program will be compiled and run. Discussion on comment lines and basic program structure will also be included. Check study plan for the information or program files to download.

Good coding style is very very very important. (Please excuse me to repeat "very" three times. Because it is really very important. A good commonly shared style can make the program less error-prone and make the team work much more efficient and lower misunderstanding.

The programmer's habits is equally essential. Please also download and study the document.

Demonstration of the building process of a simple Java Program named OnePlusOne.java.

Description of Java compilation process, dynamic linking vs static linking. Please download the program and try it.

You may create a new class in BlueJ environment. Then, you do cut and paste from this file to you own class.

Or, you may copy this file to a specific directory that you have already build. And, after that call BlueJ, BlueJ will automatically recognize the program file.

Show the JavadocDemo.java program to demonstrate how to add Javadoc-compatible comments and how to use BlueJ and command line javadoc program to generate Javadoc html page that can be viewed using browser or BlueJ environment. (Download and save JavadocDemo.java to try for your own)

Chapter 1 Quiz:

Review on basic computer and programming knowledge.

Discuss simple program structure. Introduce the concepts of variables, modifiers, expression, and assignments. Study data types, number systems and data type conversion.

Identifiers as the identification (or name) for a program part. It is very essential to learn how the identifiers are defined and used. Keyword listing is also attached for download. chapter2.pdf can be downloaded as extra reading material

Describes the naming convention for variables, constants, methods, class, and package names.

An example program to demonstrate variables and basic program structure. Please download the ComputeArea.java ComputeAreaModified.java


ComputeArea.java is a demo version. ComputeAreaModified.java has one more variable defined. Please work on the ComputeArea.java to add a new variable named perimeter and write appropriate code to assign circle perimeter to it and print the result out. The expected result should be similar to ComputeAreaModified.java.

Introduce int and double data types. Other data types are also briefly mentioned. Binary number system is discussed along with two's complement and the number representation for int, float and double data types. This lecture concluded with the constant data modifier.

Coffee Break for data, input, output and data processing. 

Present the ways of writing literals for numbers and text into a program and using them to assign value for variables and constants.

In this lecture, the basics of number systems is discussed. The binary number system used in computer and its related octal and hexadecimal number systems are also discussed. Even though binary system is used in computer system. Most of the times, computer numbers are either written in Hexadecimal or Octal code because of convenience. Please download the exercise in the attachment to work on it first. Then, download the answer key to check by yourself.

Java coffee break to show the importance of binary number system. 

Discuss how to read in data from the console and the use of constant PI. (This PI is different from Math.PI.)


Scanner is part of Java API.

Provides information about arithmetic operators and their precedence level when executed. Complete precedence levels are also provided by reserved for future reference and discussion.

Demo Program: FahrenheitToCelsius.java

Introduction of augmented assignment operators. 

On topic of casting. Explain implicit casting versus explicit casting. Also, widening casting versus narrowing casting.

Quiz: Numbers
Lab: Put things together (Continued Fractional Number)
Common Error and Pitfalls in Numbers
Lab: GetChange.java
Chapter 2 Quiz: Elementary Programming
Chapter Project: DisplayCurrentTime.java
Learn what's available in Java library to help them do programming. In Java API, there are Math, String, Scanner, PrintWriter, and other Wrapper classes to help students complete simple projects.

Introduce boolean data type, boolean operators, boolean expressions and boolean theorem.

Introduce char primitive data type and Character Class.

Use a very simple program to show boolean data type, boolean expression, char data type, arithmetic for unsigned char and String concatenation.

Briefly mention about Java API for the primitive data types, Math Class and String Class.

Coffee Break for short video clip on Boolean expression and its functionality. 

Introduce Math Class as a service and processing utility class for all numbers.

A demo program to show Random class and Math.random method.

This lab focused on Scanner and Math.random method. The student will be asked to write a program to generate two random integers and calculate the difference. Then, prompt to the console to ask for user to input the answer. If the answer is correct, then print out a correct message. Other, print out an error message and the correct answer.

(Student can download SubtractionQuiz.java but he is also encouraged to work on his own. A sample answer is in SubtractionQuizAnswer.java)

Chapter 3 Quiz 1: Numbers and Math Class

Start a series of three lectures on String class. Part 1 is on String construction and String length().

Demonstrate construction of strings and the nature of pointer (reference data type) for strings.

String Class Part 2: for String read-in from console and files. String conversion to double and integer and double. Conversion of integer and double into strings. Third part of this lecture is the methods for string comparison.

Demo proper use of Scanner input stream for integers and strings.

String Class Part 3: substring methods.

Use social security number as an example to practice substring() and charAt() methods

A lab work to experience string method replace and replaceAll

Discuss the three print out methods: println, print, printf.

Examples of printf for integer, floating points and string

Use Trigonometry function sine and cosine to demonstrate the formatted print method: printf and the use of Math class method.

ASCII code artwork has been around for many years since the text-era computers at 1970s-1980s. It is still a interesting art because it is beyond just showing the artistic presentation. It is also a good mental exercise. Enjoy it and have fun.

Short video clip for the functionality of APIs

This is the Chapter Project for this Chapter. Please download the StudentGPA.zip and unzip it. Copy the files to your own BlueJ workspace and try on the program. The StudentGPA.java is only a skeleton file. You may get started from that. Follow the comments and then do programming on yourself. Then, you may refer to the StudentGPAAnswer.java.


Should you have any issue, you are welcome to post on the discussion board, facebook page or email me.

Chapter 3 Quiz 2: Character Data Type, String Class and Data Type Conversion
Use programming exercises to help audience master the idea covered in Chapter 1, 2, and 3. Some materials in Chapter 4 will also be previewed. An Unit Test and an unit project will be given.

Unit 1 review based on the programming paradigm concept of sequential programming.

Introduce software engineering development models. (Waterfall, V-model, Spiral Mode)

Introduce the pseudo code method for software development at System Design Analysis and Design stages.

Unit 1 Exam: Multiple Choice

Two free response questions, please follow these steps:

(1) download U1R1 Free Response Problems.pdf and print a hard copy to work on it.

(2) use the rubric to score your own answer or ask some other people to score for you with honor code.

(3) download the sample answer U1R1 FRQ Sample Answer.pdf

(4) The sample java code is in the Review01.zip, please unzip it and copy it under your BlueJ project directory.

This section covers the program decision structures such as if-else-statement, switch-statement, boolean data type and algebra, conditional expression, and a program example of randomized simulation.

Introduce one-way, two-way, multiple-way if-statement, if-else-statement, and if-else-if-statements.

A simple demo program for if statements. Please download and unzip SimpleIfDemo.zip to get the .java file.

Lab: Calculate and print out an BMI report of a person based on his /her body weight and height.

Modify the StudentGPA.java to a format that read in subject score on 0-100 scale and print out a score report with letter grade.

Show many useful techniques to use Math.Random to create random samples. And discuss the applications of computer program using these techniques.

Lab: License Plate for Californian State DMV

Short Introduction to Boolean Algebra. If you are interested in this subject, please look at the external links for more information and study materials.

Also download a quiz file to practice.

Introduce guidelines for good logic design habits for conditional statements.

A Lab Project to determine whether a year is a leap year or not and to determine its associated Chinese Zodiac since 1948. (Based on modulo calculation.)

Discuss conditional expressions and switch statement.

Introduce Random class. How to use it? and its important methods: nextDouble(), nextInt() and random input for Gaussian (normal) distribution.

A Demo Program to update the StudentGPAWithLetterGrade.java to StudentGPASimulationMode.java

with two new features:

(1) Use Random Class to generate random inputs for the scores of each subject.

(2) revise the logic of the letter grade assignment.

Please download StudentGPASimulationMode.zip to unzip and try StudentGPASimulationMode.java

In this chapter, student are asked to simulate a darts throwing game for a player to throw 3 darts per game. Print the sum of the scores. Random class is required for this project to generate random numbers. Please work on your own and then, download Darts.zip for your reference. (The Darts.java is in there.)

Chapter 4 Quiz: Multiple Choice Questions
This section covers loop structures, examples to use loops, nested loops with exemplary multiplication table program, loop break levels, and an example program in Palindromes

Introduce while-loop and do-while loop. Please also download the extra document reading and the external web-site for while-loop example.

Use Addition Quiz program to demonstrate the while loop. The program also covers Random class, difficulty level, and while loop. Please download the (RepeatAdditionQuiz.zip and unzip for the RepeatAdditionQuiz.java) file and try it out.

Lab project: using while loop to find sum, average, maximum and minimum for some user input data.

Use Text File I/O to demonstrate how can a while loop be used to read in a Text file. File input stream using Scanner and File output stream using PrintWriter class. This while loop usage is very important for many applications.

This Lab work combine knowledge from while-loop for summation of numbers and FILE Input. bible.txt is a of reasonable size and is a good example for word count program example. Please download Bible.zip and unzip it. Bible.java is a sample answer program while bible.txt is the input file for students to work on.

Use a coffee shop example to show how to use do-while-loop. GetChange.java in chapter is ported here as a module to calculate the change for the customer.

Perform a Lottery Checking Game with a lottery of 4 decimal number (0 to 9). Use a menu selection for user to pick a way user want to play the lottery. If the first two numbers matched, player get a front-pair winning award. If the middle two numbers matched, it is a middle-pair win. If the last two numbers matched, it is a back-pair win. If all four numbers matched, it is the top prize. Ask user to enter his 4 digit lottery input. The program randomly generate a winning lottery number. Check if the plays wins the play he picked. If so, the program should say the player wins what game. If not, show sorry and try again message. Then, show the menu selection again. Enter a new game if the player does not quit.

Introduce for-loop as a loop with index variable. Simple example is given to show its operations. This lecture concluded with the review of Darts.java. The program is updated with for-loop structure. This program is much more powerful after the modification.

Work on the generation of a Table for sine and cosine function over a unit circle. This lab project is to experience for-loop and handling numerical round-off error. Please work on your own version first and download sine.java (sample answer) and try it out for different round-off methods for numerical error handling.

Use Index space chart (discrete vector analysis) for nested for-loop analysis. Also, include MultiplicationTable.java to illustrate the nature of nested loop. Please download and try. Extra reading document from UT Austin for nested for-loop is strongly recommended.

Extra Topics on Loops:

(1) Break Level2 (download TestBreak.zip and unzip to try)

(2) Minimizing Numerical Errors (download TestSum.zip and unzip to try) Some discussion next Lecture.

(3) Sentinel Controlled Loop

(4) Redirection of I/O (read external web-link for I/O Redirection)

Detailed Explanation about numerical error detection and handling.

Chapter Project: work on a project to analyze the probability of each of the possible outcomes of two dice rolling game. Nested loop and random number generation techniques will be used.

A Chapter project to generate password of length from 1 to 100 with 4 different optional format. (Tough Project) Strongly recommended to try.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Explores Java programming, which is standard in the industry and used by various organizations and companies
Develops programming skills, knowledge, and tools that are core skills for Java software development
Examines computer science big ideas, which are highly relevant to Java programming and software development
Taught by Eric Chou, who is recognized for his work in computer science education
Provides a strong foundation for beginners in Java programming
Offers hands-on labs and interactive materials to enhance learning
Covers a comprehensive study of Java programming fundamentals, including elementary programming, program structures, OOP, and data structures
Advises students to take other courses first as prerequisites, which may be a barrier to some learners

Save this course

Save Java Programming Essentials: AP Computer Science A to your list so you can find it easily later:
Save

Reviews summary

Ap computer science java essentials course

Students describe this AP Computer Science A Java programming course as engaging and comprehensive. They specifically praise the YouTube videos and the responsiveness of the instructor.
Instructor has a great YouTube channel
"He also has a great youtube channel I recommend checking out."
The course is extremely comprehensive
"This is an extremely comprehensive course."
The instructor is very responsive
"The instructor is very responsive and there are multiple ways to access him."

Career center

Learners who complete Java Programming Essentials: AP Computer Science A will develop knowledge and skills that may be useful to these careers:
Software Engineer
As a Software Engineer, you will be responsible for designing, developing, and maintaining software systems. This course will help you build a strong foundation in Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Software Engineer.
Computer Programmer
Computer Programmers write and test code that makes computers perform specific tasks. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Computer Programmer.
Web Developer
Web Developers design and develop websites. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Web Developer.
Database Administrator
Database Administrators are responsible for managing and maintaining databases. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Database Administrator.
Systems Analyst
Systems Analysts analyze and design computer systems. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Systems Analyst.
Computer Scientist
Computer Scientists research and develop new computer technologies. This course will help you build a strong foundation in Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Computer Scientist.
Information Technology Specialist
Information Technology Specialists provide technical support and assistance to users of computer systems. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as an Information Technology Specialist.
Business Analyst
Business Analysts analyze business processes and develop solutions to improve efficiency and effectiveness. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Business Analyst.
Quality Assurance Analyst
Quality Assurance Analysts test and evaluate software systems to ensure that they meet quality standards. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Quality Assurance Analyst.
Technical Writer
Technical Writers create and maintain documentation for computer systems and software. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge will be essential for success in your career as a Technical Writer.
Project Manager
Project Managers plan, organize, and execute projects. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge may be useful in your career as a Project Manager.
Sales Engineer
Sales Engineers sell and support computer systems and software. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge may be useful in your career as a Sales Engineer.
Consultant
Consultants provide advice and guidance to businesses on a variety of topics, including computer systems and software. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge may be useful in your career as a Consultant.
Entrepreneur
Entrepreneurs start and run their own businesses. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge may be useful in your career as an Entrepreneur.
Teacher
Teachers educate students in a variety of subjects, including computer science. This course will help you learn the fundamentals of Java programming, which is one of the most popular programming languages used in industry today. You will learn about object-oriented programming, data structures, and algorithms. This knowledge may be useful in your career as a Teacher.

Reading list

We've selected 12 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Java Programming Essentials: AP Computer Science A.
Classic guide to writing clean code. It covers a wide range of topics, from naming conventions to refactoring to unit testing. It also includes a number of helpful examples and exercises.
Comprehensive reference for the Java programming language. It covers all the basics of Java, as well as more advanced topics such as concurrency and networking. It also includes a number of helpful examples and exercises.
Classic guide to writing effective Java code. It covers a wide range of topics, from object-oriented design to concurrency and performance. It also includes a number of helpful examples and exercises.
Classic guide to software engineering. It covers a wide range of topics, from project management to team dynamics to software architecture. It also includes a number of helpful examples and exercises.
Classic introduction to the Java programming language. It covers all the basics of Java, in a clear and concise way. It also includes a number of helpful examples and exercises.
Comprehensive reference for the Java programming language. It covers all the basics of Java, as well as more advanced topics such as concurrency and networking. It also includes a number of helpful examples and exercises.
Fun and engaging way to learn Java. It uses a visual approach to teaching, with lots of diagrams and examples. It also includes a number of hands-on exercises.
Fun and engaging way to learn about design patterns. It uses a visual approach to teaching, with lots of diagrams and examples. It also includes a number of hands-on exercises.
Comprehensive introduction to the Java programming language. It covers all the basics of Java, from variables and data types to objects and classes. It also includes a number of helpful examples and exercises.
Great resource for beginners who want to learn Java. It covers all the basics of Java, in a clear and concise way. It also includes a number of helpful examples and exercises.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Java Programming Essentials: AP Computer Science A.
Java Object-Oriented Programming: AP Computer Science B
Most relevant
Decoding AP Computer Science A
Most relevant
Introduction to Java Programming: Writing Good Code
Most relevant
Introduction to Java Programming: Fundamental Data...
Most relevant
101: Introduction to Computer Science
Most relevant
Programming for a Networked World
Computer Science: Programming with a Purpose
Computer Science: Algorithms, Theory, and Machines
AP Environmental Science
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser