Skip to content

KyleGoetke-APCSA/pset-0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Problem Set 0

It's time to put your skills to the test. This problem set focuses on printing text to the console, as well as identifying and correcting compilation and runtime errors in the supplied program code.

Getting Started

To get started, create a GitHub repository to store your code. When you're finished, clone my skeleton to get all of the starter code and instructions. Setup a remote to push your code to your repository instead of mine.

Setup

  1. Login to your GitHub account and create a new repository named pset-0.
  2. In the terminal, navigate to your APCSA directory on the Desktop.
$ cd ~/Desktop/APCSA
  1. Clone my skeleton repository into a directory named pset-0.
$ git clone git@github.com:ap-java-ucvts/pset-0-skeleton.git pset-0
  1. Change into your newly created pset-0 directory.
$ cd pset-0
  1. Overwrite the remote, which originally points at my skeleton repository.
$ git remote rename origin upstream
  1. Add a new remote that points at your pset-0 repository. Replace YOUR-USERNAME with your actual username.
$ git remote add origin git@github.com:YOUR-USERNAME/pset-0.git
  1. Open up the ProblemSet0.java file in the text editor of your choice.

Pretty ugly, right? Just wait until you try to compile it. For now, you haven't yet learned enough to properly format your program and its code. Later, after you have, you'll be able to avoid code that looks as cluttered as this does.

Exercises

The specifications for each exercise are outlined below. I've written most of the code for you, but unfortunately, it is riddled with mistakes. It's your job to fix the errors I've made, so that the code meets the requirements set forth in this section (as well as the Deliverables section).

The console output for these exercises relies on consistent tab sizing. I used a width of 4 spaces for my tabs while writing the starter code, so you'll need to do the same when debugging it. Use the following command to instruct the terminal to display tab stops at 4 spaces.

tabs -4

Work through these exercises on your own. Experiment, make mistakes, ask questions, and fix your mistakes. It's the only way to get good at programming.

Exercise 1

Print a message to the console.

Exercise 1 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.

Exercise 2

Print APCS in block letters to the console.

Exercise 2 Output

  • Insert one line feed above and below the desired output.
  • Letters must have a height of seven characters, with one space between each letter.
  • Use seven print statements.
  • Do not use String concatenation.

Exercise 3

Print a quoted message to the console.

Exercise 3 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.

Exercise 4

Print a face to the console.

Exercise 4 Output

  • Insert one line feed above and below the desired output.
  • Use six print statements.
  • Do not use String concatenation.

Exercise 5

Print a to-do list to the console.

Exercise 5 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.
  • Do not print more than one consecutive space.

Exercise 6

Print a square of text to the console.

Exercise 6 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.
  • Do not print more than one consecutive space.

Exercise 7

Print a countdown to the console.

Exercise 7 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.
  • Do not print more than one consecutive space.

Exercise 8

Print three diamonds to the console.

Exercise 8 Output

  • Insert one line feed above and below the desired output.
  • Use six print statements.
  • Do not use String concatenation.

Exercise 9

Print an encouraging message to the console.

Exercise 9 Output

  • Insert one line feed above and below the desired output.
  • Use one print statement.
  • Do not use String concatenation.

Exercise 10

Print a plus sign to the console.

Exercise 10 Output

  • Insert one line feed above and below the desired output.
  • Use three print statements.
  • Do not use String concatenation.
  • Do not print any spaces.

Deliverables

After fixing each of the compilation and runtime errors, your code should produce the following output.

Problem Set 0 Output

Deadline

Please read very carefully. Historically, most students lose points on problem sets for simply failing to read the instructions and requirements.

  • September 15, 2019, at 11:59pm.

If you submit your problem set at midnight (i.e., September 16, 2019, at 12:00am), it is considered late!

Submission Requirements

  • Your code must compile. Code that fails to meet this minimum requirement will not be accepted.
  • There must be at least 5 unique commits to your repository.
  • Your code must meet each requirement outlined in the Exercises and Deliverables sections.
  • Your code must adhere to the course style guidelines.

Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages