AHPA #19: Bowling Balls • • . Jiffy Lanes has a problem: they can't keep track of their bowling balls. They have two types of bowling balls: 8 lb balls for use by children and 12 lb balls for use by adults. They need you to create a Rust program with data structures that will allow them to keep track of their bowling balls. The number of children's balls is fixed: they have red, green, yellow, blue, and purple balls. The number of adult balls is variable because people walk off with them. They currently have: gold, black, silver, aqua, pink, and brown. Create an array data structure for the children's balls and a vector data structure for the adult balls. Add a lavender ball to the adult vector. Print out the contents of both data structures. Children's bowling balls: red green yellow blue Adult's bowling balls: gold silver aqua pink
AHPA #19: Bowling Balls • • . Jiffy Lanes has a problem: they can't keep track of their bowling balls. They have two types of bowling balls: 8 lb balls for use by children and 12 lb balls for use by adults. They need you to create a Rust program with data structures that will allow them to keep track of their bowling balls. The number of children's balls is fixed: they have red, green, yellow, blue, and purple balls. The number of adult balls is variable because people walk off with them. They currently have: gold, black, silver, aqua, pink, and brown. Create an array data structure for the children's balls and a vector data structure for the adult balls. Add a lavender ball to the adult vector. Print out the contents of both data structures. Children's bowling balls: red green yellow blue Adult's bowling balls: gold silver aqua pink
Related questions
Question
USE RUST
![AHPA #19: Bowling Balls
•
•
.
Jiffy Lanes has a problem: they can't keep track of their bowling balls.
They have two types of bowling balls: 8 lb balls for use by children and
12 lb balls for use by adults.
They need you to create a Rust program with data structures that will allow them
to keep track of their bowling balls.
The number of children's balls is fixed: they have red, green, yellow, blue, and
purple balls.
The number of adult balls is variable because people walk off with them. They
currently have: gold, black, silver, aqua, pink, and brown.
Create an array data structure for the children's balls and
a vector data structure for the adult balls.
Add a lavender ball to the adult vector.
Print out the contents of both data structures.
Children's bowling balls:
red
green
yellow
blue
Adult's bowling balls:
gold
silver
aqua
pink](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F82aefee1-a4fd-40e7-8b3f-97f92bfc6e2a%2F10ea031b-227b-46d3-bcda-986ecfe7fdfb%2Fbccuqyc_processed.png&w=3840&q=75)
Transcribed Image Text:AHPA #19: Bowling Balls
•
•
.
Jiffy Lanes has a problem: they can't keep track of their bowling balls.
They have two types of bowling balls: 8 lb balls for use by children and
12 lb balls for use by adults.
They need you to create a Rust program with data structures that will allow them
to keep track of their bowling balls.
The number of children's balls is fixed: they have red, green, yellow, blue, and
purple balls.
The number of adult balls is variable because people walk off with them. They
currently have: gold, black, silver, aqua, pink, and brown.
Create an array data structure for the children's balls and
a vector data structure for the adult balls.
Add a lavender ball to the adult vector.
Print out the contents of both data structures.
Children's bowling balls:
red
green
yellow
blue
Adult's bowling balls:
gold
silver
aqua
pink
AI-Generated Solution
Unlock instant AI solutions
Tap the button
to generate a solution