
- Java
- Beginner
About this Course
In this course you will gain all the knowledge you will need to build an interactive command line program in Java. No prior programming experience is required. You will create an interactive game that prompts users for different parts of a sentence and then generates a story using those words.
What you'll learn
- Write programs in the Java programming language
- Use the console to interact with users
- Use basic data types to store and name data
- Use conditionals and looping to control program flow
Getting Started with Java
In this stage you will familiarize yourself with Workspaces, your programming environment for this course. We will learn about how to interact with the user using the console object. We will learn about variables, and more specifically, Strings.
6 stepsUsing your New Tools
In this stage, you will learn how to add multiple formatters to a format string, and we will have a finished prototype. We will also cover what happens if and when you encounter errors.
6 stepsPerfecting the Prototype
In this stage we will apply feedback we received and add feature enhancements to our prototype. We will add an age restriction and make sure that certain words are not allowed. We will explore branching and looping to solve common problems.
10 steps-
Reviewing Our Feedback
6:11
-
Conditional ints
3 objectives
-
Parsing Integers
3:46
-
Parsing Integers
1 objective
-
Censoring Words - Using String Equality
4:51
-
String Equality
2 objectives
-
Censoring Words - Using Logical ORs
4:31
-
Using Logical ORs and ANDs
5 questions
-
Censoring Words - Looping Until the Value Passes
7:16
-
Looping until the value passes
3 objectives
-
Extra Credit
- There is a method on string called
contains
. It checks to see if one string is contained within the other. This seems like a good way to build a master list of words that are not allowed. Why don't you see if what they typed is in a long string of bad words. - After you get that working, attempt to take case into account. If your list of bad words that you maintain is all lower cased, you can check the lower case version of the input in the bad string. How do you make a string lowercase?
- Watch the Feeling Loopy workshop
- There is a method on string called
Teacher
-
Craig Dennis
I am a developer / mentor seeking to make this world better than it was yesterday. I am a proud father. You can find me around Internettown as craigsdennis.