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

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