Requirements:
Additional Notes:*
Example:
Please select an adoption process: 1) Adoption by animal amount 2) Adoption by budget **1** Enter the amount of animals you are adopting: **2** Which dog would you like to adopt? 1) Small dog ($25) 2) Medium dog ($40) 3) Large dog ($65) **1** You have chosen a small dog for $25! Which dog would you like to adopt? 1) Small dog ($25) 2) Medium dog ($40) 3) Large dog ($65) **3** You have chosen a large dog for $65! Your final total is $90 for 2 dog(s).
Please select an adoption process: 1) Adoption by animal amount 2) Adoption by budget **2** Enter your adoption budget: $**50** Which dog would you like to adopt? 1) Small dog ($25) 2) Medium dog ($40) 3) Large dog ($65) **3** Sorry but you cannot afford that option. Enter your adoption budget: $**50** Which dog would you like to adopt? 1) Small dog ($25) 2) Medium dog ($40) 3) Large dog ($65) **2** You have chosen a medium dog for $40! You have bought 1 dog(s) with $10 remaining.
Note: Could you plz go through this code and let me
know if u need any changes in this.Thank You
=================================
#include <iostream>
using namespace std;
void displayMenu();
int main() {
int choice, animalChoice, total = 0,n,budget,cnt=0;
cout << "Please select an adoption process:" <<
endl;
cout << "1)Adoption by animal amount" << endl;
cout << "2)Adoption by budget" << endl;
cin >> choice;
if (choice == 1){
cout<<"Enter the amount of animals you are adopting:";
cin>>n;
for(int i=0;i<n;i++)
{
displayMenu();
cin>>choice;
switch(choice)
{
case 1:{
cout<<"You
have chosen a small cat for $25!"<<endl;
total+=25;
break;
}
case 2:{
cout<<"You
have chosen a medium cat for $40!"<<endl;
total+=40;
break;
}
case 3:{
cout<<"You
have chosen a large cat for $65!"<<endl;
total+=65;
break;
}
}
}
cout<<"Your final total is $"<<total<<" for
"<<n<<" cat(s)."<<endl;
}
else if (choice == 2){
cout<<"Enter your adoption budget: $";
cin>>budget;
while(budget>=25)
{
displayMenu();
cin>>choice;
switch(choice)
{
case 1:{
if(budget>=25)
{
cout<<"You
have chosen a small cat for $25!"<<endl;
budget-=25;
cnt++;
}
else
{
cout<<"Sorry but you cannot
afford that option."<<endl;
}
break;
}
case 2:{
if(budget>=40)
{
cout<<"You
have choosen a medium cat for $40!"<<endl;
budget-=40;
cnt++;
}
else
{
cout<<"Sorry but you cannot afford that
option."<<endl;
}
break;
}
case 3:{
if(budget>65)
{
cout<<"You
have choosen a large cat for $65!"<<endl;
budget-=65;
cnt++;
}
else
{
cout<<"Sorry but you cannot afford that
option."<<endl;
}
break;
}
}
}
cout<<"You have bought "<<cnt<<" cat(s) with
$"<<budget<<" remaining."<<endl;
}
return 0;
}
void displayMenu()
{
cout<<"\nWhich cat would you like to
adopt?"<<endl;
cout<<"1) Small cat ($25)"<<endl;
cout<<"2) Medium cat ($40)"<<endl;
cout<<"3) Large cat ($65)"<<endl;
}
=================================
Output#1:
===============================
Output#2:
=====================Could you plz rate me well.Thank You
Requirements: The first part of the program will require user input that indicates whether the user...
**IN JAVAA**
Write a program where a user populates a collection of various
cats and dogs. The user should be able to specify which type they
wish to enter, and then are prompted with the pertinent information
for every type of pet.
Requirements:
The structure of the program should follow this UML class
diagram.
You may also include helper methods and attributes that are not
noted in the class.
Additional Notes:
The weight for animal should be strictly greater...
Program Requirements · The program prompts the user to enter a loan amount and an interest rate. · The application calculates the interest amount and formats the loan amount, interest rate, and interest amount. Then, it displays the formatted results to the user. · The application prompts the user to continue. · The program stops prompting the user for values after taking 3 loan amounts. · The application calculates and displays the total loan and interest amount and ends the program Example Output Welcome to...
Write a program in python that asks the user to input a sentence. The program will ask the user what two letters are to be counted. You must use a “for” loop to go through the sentence & count how many times the chosen letter appears in the sentence. You are not allowed to use python built-in function "count()" or you'll get a Zero! Output will show the sentence, the letter, and the number of times the letter appears in...
Question 1 ^
2 What is the main point of the passage?
3 What will happen if someone shows up before opening?
4 What would happen if a dog owner showed up and had food?
5 what would happen if someone had toys and food outside the
park gates?
"BARK IN THE PARK GRAND REOPENING EVENT Join us on Saturday from 11am to 3pm at Meadowview park for the grand reopening of the newly renovated de park to celebrate the...
e TailSpin Pet Supply Company (TailSpin) is a le company that purchases dog beds manufacturer and resells them to retail small e company has three inventory items: g beds, medium dog beds, and large dog TailSpin uses a perpetual inventory system, method. They own land with a building, which into office and warehouse space. All expenses th the office are categorized as Administrative Expenses. All FIFO is divided associated expenses with the warehouse, which is used for the shipping and...
write a c++ program that prompts a user for a number then attempts to allocate an array of as many integers as the user enters. In other words, the program might prompt the user with a line like: “How many integers would you like to allocate?” It should then allocate as many integers as the user enters. The program should then wait for the user to press enter before deleting the allocated array and quitting. We will use this time...
The Task: Create a console application that prompts the user to select either a stack, queue, linked list, or binary search tree. Then prompt the user for a number that will then be passed to a recursive function that will populate an array in ascending order. If user selected binary search tree, they will then be prompted to choose how the data will be received either in-order, preorder, or post-order. If user selected linked list, they will then be prompted...
Please help me in both questions, thank you very much
:)
QUESTION 4 John and Louise are trying to figure out how to spend their Saturday night. They will do things together, but value the following three possible activities differently. They can go to a music concert, watch the tennis, or have a picnic in the park. John would prefer to go to the concert but Louise does not really like the music that will be played. Meanwhile, Louise wants...
"BARK IN THE PARK GRAND REOPENING EVENT on Saturday from 11am tomat Meadowview park for the and rec o me park to celebrate the city is sponsoring an adoption event with the local human society. Resident can bring the dog to check out the new features of the park or adopt a furry friend Highlights of the park: Expended sort of leash area for small and large does Covering a total e Improves agility courses(canines only please] Swimming pond and...
Lab #6 Number Guessing Game – Loops and Nested Loops Requirements: Design, develop, test, and submit a program for a Number Guessing game. The program will select a random number between 0 and 100, allow the user to try up to 10 times to guess the number, and tell the user if each guess is too high, too low, or correct. The actual game portion must be a function...you can use more than one function in your program. The amount...