Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task: For this lab, you are to create a program which will simulate feeding the dragons. There are 5 dragons and 5 riders in total.

image text in transcribed
image text in transcribed
Task: For this lab, you are to create a program which will simulate feeding the dragons. There are 5 dragons and 5 riders in total. Each rider feeds their own dragon. If the rider runs out of food, then they need to go get more food and come back to finish feeding. Some riders are carrying more food with them initially or brought more food with them before hand. Specifications: There are a total of 5 dragons and 5 riders (Rufnut and Tufnut count as 1 rider, barf and belch count as one dragon), represented by integers. The dragons start at zero The riders starting values are as follows: Hiccup: 70 Astrid: 60 Snotlout: 40 Fishlegs:50 Rufnut and Tufnut: 20 The riders dragons are as follows (ordered according to rider list above): Toothless Stormfly Hookfang Meatlug Barf and Belch The riders feed their dragons 10 units of food at a time The riders can carry back at most 10 units of food If a rider needs to go get more food, then they cannot feed their dragon that round The dragons are full when their value is equal to or exceeds 100 is all full" where blank is the name When the dragon is full, output:"_ of the dragon Once a dragon is full, do not feed it more food Once all dragons are full, output something such as "Feeding time is over" Hints: Your will need to use decision branching and loops for this assignment The carry limit, feeding amount and feeding goal should be constants Remember proper formatting, documentation and variable names

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

Why do women deny personal discrimination?

Answered: 1 week ago