diff --git a/book.toml b/book.toml index fbcd4d5..829cc9e 100644 --- a/book.toml +++ b/book.toml @@ -15,6 +15,8 @@ mathjax-support = true additional-css = ["ferris.css"] additional-js = ["ferris.js"] heading-split-level = 2 +default-theme = "light" +preferred-default-theme = "light" [output.html.fold] enable = false # whether or not to enable section folding diff --git a/src/SUMMARY.md b/src/SUMMARY.md index c045bc7..b14d6e1 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -101,7 +101,6 @@ Intro to testing Gui stuff --> -# Modern Java - [Prelude](./prelude.md) - [Asking for Help](./prelude/asking_for_help.md) @@ -109,7 +108,46 @@ Gui stuff - [Lies](./prelude/lies.md) - [AI](./prelude/ai.md) - [Java](./prelude/java.md) -- [Getting Started](./getting_started.md) + +# The Computing Environment + +- [Hardware](./hardware.md) + - [CPU](./hardware/cpu.md) + - [RAM](./hardware/ram.md) + - [Hard Drives](./hardware/hard_drives.md) + - [Motherboard](./hardware/motherboard.md) +- [Operating Systems](./operating_systems.md) + - [Personal Computers](./operating_systems/personal_computers.md) + - [Servers](./operating_systems/servers.md) + - [Mobile Phones](./operating_systems/mobile_phones.md) + - [Game Consoles](./operating_systems/game_consoles.md) + - [Abstractions](./operating_systems/abstractions.md) + - [Defaults](./operating_systems/defaults.md) + +# Modern Java + +- [Set Up Your Computer](./text_editors/set_up_your_computer.md) + - [Text Editors](./text_editors.md) + - [IDEs](./text_editors/ides.md) + - [VSCodium](./text_editors/vscodium.md) + - [Install VSCodium](./text_editors/install_vscodium.md) + - [Install Java](./text_editors/install_java.md) +- [The Terminal](./the_terminal.md) + - [Bash](./the_terminal/bash.md) + - [Windows Subsystem for Linux](./the_terminal/windows_subsystem_for_linux.md) + - [Chromebooks and School Computers](./the_terminal/chromebooks_and_school_computers.md) + - [Commands](./the_terminal/commands.md) + - [Directories](./the_terminal/directories.md) + - [Listing Files](./the_terminal/listing_files.md) + - [Creating Directories](./the_terminal/creating_directories.md) + - [Changing Directories](./the_terminal/changing_directories.md) + - [Creating Files](./the_terminal/creating_files.md) + - [Run Java Programs](./the_terminal/run_java_programs.md) + - [Getting Used to it](./the_terminal/getting_used_to_it.md) + - [Challenges](./the_terminal/challenges.md) + + + - [First Steps](./first_steps.md) - [Comments](./first_steps/comments.md) - [Semicolons](./first_steps/semicolon.md) @@ -445,7 +483,7 @@ Gui stuff # Projects -- [Tic-Tac-Toe]() +- [Tic-Tac-Toe](./projects/tic_tac_toe.md) # Concepts @@ -458,35 +496,6 @@ Gui stuff - [Practice](./code_is_read_more_than_written/practice.md) - -# The Computing Environment - -- [Hardware](./hardware.md) - - [CPU](./hardware/cpu.md) - - [RAM](./hardware/ram.md) - - [Hard Drives](./hardware/hard_drives.md) - - [Motherboard](./hardware/motherboard.md) -- [Operating Systems](./operating_systems.md) - - [Personal Computers](./operating_systems/personal_computers.md) - - [Servers](./operating_systems/servers.md) - - [Mobile Phones](./operating_systems/mobile_phones.md) - - [Game Consoles](./operating_systems/game_consoles.md) - - [Abstractions](./operating_systems/abstractions.md) - - [Defaults](./operating_systems/defaults.md) -- [The Terminal](./the_terminal.md) - - [Bash](./the_terminal/bash.md) - - [Windows Subsystem for Linux](./the_terminal/windows_subsystem_for_linux.md) - - [Chromebooks and School Computers](./the_terminal/chromebooks_and_school_computers.md) - - [Commands](./the_terminal/commands.md) - - [Directories](./the_terminal/directories.md) - - [Listing Files](./the_terminal/listing_files.md) - - [Creating Directories](./the_terminal/creating_directories.md) - - [Changing Directories](./the_terminal/changing_directories.md) - - [Creating Files](./the_terminal/creating_files.md) - - [Run Java Programs](./the_terminal/run_java_programs.md) - - [Getting Used to it](./the_terminal/getting_used_to_it.md) - - # Control Flow IV - [Exceptions II](./exceptions_ii.md) @@ -551,7 +560,7 @@ Gui stuff - [Optimized Implementation](./growable_arrays/optimized_implementation.md) - [Challenges](./growable_arrays/challenges.md) -# Interactive Programs II +# Interactive Programs III - [Command Line Arguments](./command_line_arguments.md) - [Accessing Arguments](./command_line_arguments/accessing_arguments.md) @@ -613,7 +622,7 @@ Gui stuff - [Challenges](./integers_ii/challenges.md) -# Interactive Programs III +# Interactive Programs IV - [Files](./files.md) - [Paths](./files/paths.md) @@ -874,10 +883,9 @@ Make them do one. --> - [Arguments](./lambdas/arguments.md) - [Return](./lambdas/return.md) - [Method References](./lambdas/method_references.md) + - [Constructor References](./lambdas/constructor_references.md) - [Inference](./lambdas/inference.md) - [Built-In Functional Interfaces](./lambdas/built_in_functional_interfaces.md) - - [Runnable](./lambdas/runnable.md) - - [Function](./lambdas/function.md) - [Checked Exceptions](./lambdas/checked_exceptions.md) - [Challenges](./lambdas/challenges.md) @@ -953,7 +961,11 @@ TODO: Wait for hermetic java - [Collectors](./streams/collectors.md) - [Purpose](./streams/purpose.md) - [Challenges](./streams/challenges.md) + + + # Conclusion - [What Now?](./conclusion/what_now.md) ## Challenge 4 Only adding lines in the middle and without writing `"A"` or `"B"` again, @@ -73,6 +74,7 @@ B A ``` + ```java,editable void main() { String a = "A"; @@ -87,6 +89,26 @@ void main() { } ``` +To be clear: you are not allowed to write `b = "A";` or `a = "B";` + +
+ Hint 1: +

You can always make new variables.

+
+ +
+ Hint 2: +

What you need to do is make a "temporary variable" to hold one of the values before you swap them.

+
+ +
+ Solution +

+String temp = a;
+a = b;
+b = temp;
+

+
## Challenge 5