Answered step by step
Verified Expert Solution
Link Copied!

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 ("1#{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 Southern-style Hummingbird layer cake features a crowd-pleasing
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 (12 servings).
IMGREDIENTS
cups al1-purpose 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
(8-oz.) can crushed pineapple in juice, undrained
cups chopped bananas (about 4 medium bananas)
vegetable shortening
Cream Cheese Frosting
(6-oz.) packages cream cheese, softened
cup butter, softened
(16-oz.) packages powdered sugar
teaspoons vanilla extract
Additional Ingredient
1 cup pecan halves, toasted
Recipe is continued on the next page.
Preheat oven to 350F. 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 3 well-greased (with shortening) and floured
9-inch round cake pans.
Bake in preheated oven until a wooden pick inserted in center comes out clean,
25 to 30 minutes. Cool in pans on wire racks 10 wire racks, and cool completely, about 1 hour.
Prepare the Cream Chese Frosting:
Beat cream cheese and butter with an electric mixer on medium-low 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 1 cup of the frosting.
Top with second layer, and spread with 1 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:
ab_Assignment_4C.rb
Where a is the students first letter of their first name and b is the first letter of their last name.
The Ruby file is required to have a programmer header containing the following:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

What is an accounting entity?

Answered: 1 week ago