Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction The purpose of this assignment is to familiarize you with the writing Ruby scripts that make use of print statements. In this assignment, we
Introduction
The purpose of this assignment is to familiarize you with the writing Ruby scripts that make use
of print statements. In this assignment, we will display the Hummingbird Cake recipe.
Hummingbird Cake
Display the recipe for the Hummingbird Cake using the print statement
You will be printing fractional characters for the ingredients. I have included the necessary
codes to print the fractions and have included a sample of how to print the first ingredient.
The recipe has been attached.
The program output should match the sample output and contain no spelling errors.
For this assignment, you will need the following code snippet to be placed after the Programmer
Header be sure to add a comment about what the assignments are:
The above snippet assigns variables to contain Unicode symbols. To display these symbols, use
the print statement:
print #oneHalf cups vegetable oil
The above statement prints the symbol for one half, followed by the text string cup of butter'.
The new line character was added at the end of the line.
Shown below is the expected output produced by the program. Note: the spacing and line
lengths should be identical.
Humingbird Cake
This Southernstyle Hummingbird layer cake features a crowdpleasing
combination of banana, pineapple, and coconut. The name's origin remains
something of a mystery: Some say it's because the cake is as sweet as nectar;
others, that it makes you hum with happiness servings
IMGREDIENTS
cups alpurpose flour, plus more for pans
cups sugar
teaspoon table salt
teaspoon baking soda
teaspoon ground cinnamon
large eges, lightly beaten
cups vegetable oil
teaspoons vanilla extract
oz can crushed pineapple in juice, undrained
cups chopped bananas about medium bananas
vegetable shortening
Cream Cheese Frosting
oz packages cream cheese, softened
cup butter, softened
oz packages powdered sugar
teaspoons vanilla extract
Additional Ingredient
cup pecan halves, toasted
Recipe is continued on the next page.
Preheat oven to Whisk together flour,
sugar, salt, baking soda, and cinnomon in a large bowl; add eggs and oil,
stirring just until dry ingre bananas, and toasted pecans.
Divide batter evenly among wellgreased with shortening and floured
inch round cake pans.
Bake in preheated oven until a wooden pick inserted in center comes out clean,
to minutes. Cool in pans on wire racks wire racks, and cool completely, about hour.
Prepare the Cream Chese Frosting:
Beat cream cheese and butter with an electric mixer on mediumlow speed
until smooth. Gradually add sugar, beating at low speed until blended after
each addition. Stir in vanilla.
Assemble Cake:
Place first cake layer on a serving platter; spread top with cup of the frosting.
Top with second layer, and spread with cup frosting. Top with third loyer,
and spread remaining frosting over top and sides of cake. Arrange pecan halves
on top of cake in a circular pattern.
Programmer Header
Students will need to create a file:
abAssignmentCrb
Where is the students first letter of their first name and is the first letter of their last name.
The Ruby file is required to have a programmer header containing the following:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started