JFo 2 Practice
JFo 2 Practice
JFo 2 Practice
Practices - Section 2
Overview
Using text to create a picture is known as ASCII art. In section 2, we made an ASCII art cat. In this practice, you’ll use print statements
to recreate the image above.
Task
Use 8 print statements to recreate the smiley face above. Your art will rely on only a single character, besides space, such as X or #.
Copyright © 2022, Oracle and/or its affiliates. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Problem 2: Original ASCII Art
Overview
Using text to create a picture is known as ASCII art. In section 2, we made an ASCII art cat. In this practice, you’ll create your own
beautiful work of art.
Task
Use print statements to create your own beautiful original ASCII art. Use comments to describe what your image is depicting.
It’s ok for your art to rely on only a single character, besides space, such as X or #. But you’re encouraged to use a few different
characters in your design, like in the cat example from class.
You’re welcome to create another cat. However, this image must look significantly different from the example used in class. Similarly,
you’re welcome to create another face, but it must look significantly different from the face in the previous practice (it’s way too easy to
turn the smiley face into a frowny face).
Note: The backslash (\) character has special meaning in Java print statements. If you choose to use a backslash in your image, you’ll
actually need to write two backslashes (\\) in your print statement.
Copyright © 2022, Oracle and/or its affiliates. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. 2
Problem 3: The Snake Box Factory
Overview
Here at the world renowned Snake Box Factory, we pride ourselves on our ability to deliver the highest quality, custom sized, cardboard
boxes to our customers. Our boxes are filled with the highest quality, custom-ordered snakes. We service thousands of accounts
worldwide and have a solid 98% satisfaction rating with customers. However, the entire ordering process is currently written on
cardboard, which is transported between departments via carrier snake. We thought this would be a good way to show confidence in
the quality and usefulness of our product. But as our business continues to grow, we’re realizing this was a bad idea. We believe it’s
time for a more conventional and digitized approach to our operations. Would you be able to help us develop the software we need to
make this happen?
Sincerely,
President George Johnson,
The Snake Box Factory
Tasks
Read the scenario found in the overview and consider what objects could be modeled as part of creating a software solution. Identify 3
objects from this scenario (remember, objects can be either tangible or abstract. List 3 properties and 3 behaviors belonging to each
object.
Copyright © 2022, Oracle and/or its affiliates. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. 3