Prompt the user to enter the total capacity of the cage.

Assignment Help C/C++ Programming
Reference no: EM13938215

A farmer has a bunny farm. He has cage capacity for a limited number of bunnies. A pair of adult bunnies will give birth to 2 bunnies (1 male and 1 female) at the end of every three months. A bunny is an adult when he or she reaches the age of 4 months. (i.e. 1st pair at age 3 months give birth to1 male and 1 female at the end of the 4th month). For example:
Number of months   Number of bunnies
           0                                    2
           3                                    4
           6                                    8
           9                                   16
          12                                   32
and so on..........

Write a complete C++ program to do the following:

1. Prompt the user to enter the total capacity of the cage.

2. Determine when the farmer will have to separate the bunnies in order to prevent the birth of any more.

3. Convert the above time in months to years and months.

4. Determine the number of bunnies that could still be accommodated in the cage when the bunnies were separated.

5. Prompt the user to input a time (in months) to check how many bunnies are present at a given time.

6. Print your results as indicated on the next page.

Save your program as bunny_world.cpp

Program 8 will be worth 100 points and will be assigned points as follows:
Program compiles 20 Points
Documentation
Header documentation (programmer info) 5 Points
Input
User-prompted data 15 Points
Output
Personal Information 5 Points
Capacity of cage 5 Points
Number of months when cage is full 5 Points
Full capacity reached in years and months 5 Points
Remaining space available at time of separation 5 Points
Number of bunnies in cage at a specified time 5 Points
Method

In addition to the usual programmer statements your output should include the following:

Your cage can hold number of bunnies.
In months you will have to separate the boy bunnies from the girl bunnies.
This is the same as years and months.
When the males and females are separated your cage will still be able to accommodate extra bunnies.
After time you will have bunnies in the cage.

Tip: The items in color represent values your program is to either input or calculate and print.

BONUS: If you can correctly write this program using functions for any or all of the following, you can receive extra credit. I will award 5 extra points for any of the following done correctly using functions. Remember, you may or may not have to pass data for any or all of these. If you cannot do all of them, try any that you can do.

 Printing of Programmer information

 Cage size (prompt to user and storage of input to be used by program)

 When bunnies will have to be separated

 Months to years and months conversion

 Number of extra bunnies your cage can hold after bunnies are separated

Reference no: EM13938215

Questions Cloud

Why would such migration be important : In many countries, conservationists are trying to design national park systems so that "islands" of natural area (the big parks) are connected by thin "corridors" of undisturbed habitat. The idea is that this arrangement will allow animals and pla..
Project management in managing the implementation : How effective is Project Management in managing the implementation of projects across different industrial and business sectors?
What potential cost individuals might incur during migration : Tell what other cues the males could use in this migratory return to their previous homesites and describe how they could orient or navigate using these cues. Remember that they fly during the daytime.
Creating a labview virtual instrument : Question 1 - Creating a LabVIEW virtual instrument (VI) Create a VI for the RLC series circuit shown below that will calculate the following values:
Prompt the user to enter the total capacity of the cage. : Determine when the farmer will have to separate the bunnies in order to prevent the birth of any more.
Why is hydrogen is place in group one not seven : Why is hydrogen is place in group one not seven
Contemporary events-discuss in relation to the major themes : Is security in the 21st century about great power rivalry or about problems of disorder and the failure of governance? Choose one of the following contemporary events and discuss in relation to the major themes and theories that we have covered in ..
Porters three generic strategies : What are Porter's three generic strategies and how can a company add value by using Porter's chain analysis
Prepare the entry to record repayment of the note on april : Indicate how the note and the accrued interest would appear on the balance sheet at December 31, 2009. Prepare the entry to record the repayment of the note on April 30, 2010.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd