Create a C++ app that makes random dog sounds (a BarkFest). Create a Visual Stud

Create a C++ app that makes random dog sounds (a BarkFest).
Create a Visual Studio C++ Console Application named ex5_barkfest. This new project will provide a file named ex5_barkfest.cpp.
Edit the ex5_barkfest.cpp file to create your BarkFest app.
Copy/paste the barkfest[] array definition from these provided code snippets Download provided code snippets.
Generate a random number of sounds to make. The number of sounds should range from 1 to the value of constant BARK_COUNT (use the snippet).
In a for loop, select each random sound from the barkfest[] array and display it to the console. Use sizeof() to determine the highest array index (see the snippets).
Checkpoint: Try running your code and enjoy the dog symphony. Fix any errors so your app runs without crashing.
Once your app runs, seed the random number generator with srand (see the snippets). Each run should display a different dog symphony.
Extra 5 points: add a loop to play dog symphonies until the user wants to quit. Use char input for this.
Check your code for proper indentation, comments, and white space (blank lines).
Run your code one last time to make sure you didn’t introduce a typo.
Submit your completed .cpp file.
Sample Output

Posted in C++

https://gcccd.instructure.com/courses/53196/assign…i just need to fix it to pu

https://gcccd.instructure.com/courses/53196/assign…i just need to fix it to put these on it
you have the right idea on Exercise 2, the math and logic expressions. Watch out for arithmetic errors (Math #1 and #3). Remember to evaluate left to right. On Logic #4 divide by 4 first, then multiply by 3. On Logic #2-5 the last evaluation step is missing.

Posted in C++

Lab Chapter 4 Here we will be taking data in as a file. Note that the sample fi

Lab Chapter 4
Here we will be taking data in as a file. Note that the sample file provided here is not the file that I will use to grade your assignment but the formatting will be the same.
File input is very similar to how data comes in from the user through cin (using the same operators) but we will need to setup the stream ourselves.
First we need to include at the top of our file.
We will need to create an input file stream to work from now. We will do this with ifstream. ifstream is a datatype just like int or float. Create a variable with the datatype being ifstream. We will define the variable by using the member accessor operator to call the open function and passing in “Judges.txt”, which is where our data will be.
Example: [whatever the variable name is].open(“Judges.txt”);
Your program must be setup to open “Judges.txt” as the file. For testing you can add your own Judges.txt file into visual studios or xcode as a resource. The judges file will be formatted like:
Judges.txt
David 4 R Y G B
Max 2 R G
Elora 1 P
Felicity 3 G P Y
Sam 5 Y G P B R
Ken 2 P G
There are 6 judges (each on his only line). Each judge has a been given a different number of ballots (number of votes), this is the number given after their name. The judges are voting on the candidate that they like most, and the order of their votes matter. The first vote a judge gives is worth 5 pointes, the second vote 4 points, the third 3, and so on, with the fifth vote being worth 1 point.
Each judge has a maximum of 5 votes and there are 5 candidates in the voting race. The candidates are Red, Green, Blue, Yellow, and Purple (each represented in the file by their first letter). Your job is to add up the points for each candidate and announce the winner. In order to complete this assignment you will need to use selection statements for reading the file and for comparing the candidates at the end.
When comparing candidates, instead of comparing each one to one another pick one as the highest (or best) and compare it to the others one at a time. If you find a higher (better) candidate, then set this as the one you are comparing and continue until you go through all of them. If you have problems with this then ask during class or office/tutoring hours.

Posted in C++

this is 1 “create commented code for 2D shapes in modern OpenGL. If you encounte

this is 1 “create commented code for 2D shapes in modern OpenGL.
If you encounter any challenges while completing this assignment, be sure to post your questions or issues to the General Questions discussion. It is essential to ask for help when you need it and successfully complete each activity, as the course will continue to build on earlier learning as your skills progress.
Prompt
Before you begin, be sure to review the module resources for this week’s topics. Then, if you have not done so already, navigate to the CS 330 folder in GitHub. From there, download the ZIP file containing all of the items within this folder, including assignment tutorials for Module Two through Module Six. There are two essential parts to these tutorials: the markdown (MD) files that walk you through how to work with different OpenGL capabilities, and the solution (SLN) file that contains all the code for each section of the tutorials. On your own machine, open the solution (SLN) file in Visual Studio and navigate to the Module Four tutorial sections in the Solution Explorer. While you may open the markdown (MD) file using an external text-based program, we recommend you instead follow along with the Module Four Tutorial in GitHub so it is easier to review the different sections, code, and supporting images. Going through all the sections in the tutorial and attempting the embedded exercises will help you practice the skills you will need to demonstrate in this assignment.
Once you understand the content in the tutorial, you will begin this assignment by opening a new Visual Studio project that has all the libraries set up correctly (which you learned how to do in a previous module). The goal of this assignment is to write commented modern OpenGL code that allows for panning, zooming, and orbiting a pyramid. Use the keyboard, mouse, and movement combinations below:
WASD keys: These keys should be used to control the forward, backward, left, and right motion.
QE keys: These keys should be used to control the upward and downward movement.
Mouse cursor: This should be used to change the orientation of the camera so it can look up and down or right and left.
Mouse scroll: This should be used to adjust the speed of the movement, or the speed the camera travels around the scene.
Specifically, you must address the following rubric criteria:
Create code to address the required functionality. The work you complete in OpenGL must meet the required functionality and visual representation that are outlined for this particular topic. Achieving this result may require multiple attempts or the application of programming strategies, but that is okay! Working in iterations is an important part of any coding project. You may also wish to refer back to relevant sections of this week’s tutorial for further guidance or review.
Apply logic and proper syntax to code. Source code should be free of logical or syntax errors that prevent the application from running as expected. You will be given credit for code that is well on its way to meeting specifications or solving the problem.
Apply commenting and formatting standards to facilitate understanding of the code. All code should be well commented. This is a practiced art that requires clarity and concision. Your comments should explain the purpose of lines or sections of the code and may also include the method you used to achieve a specific task in the code. Be sure to document any sections of code that are producing errors or incorrect results. Also, all code should be organized to meet formatting standards.
What to Submit
Submit a completed ZIP folder with all of your code, which may include one or multiple CPP files along with Visual Studio project files. Also make sure the ZIP folder includes an EXE file, because without this your code will not be able to run. Checking for the EXE can be used as a quick reference on the functionality of your code before you submit.”

Posted in C++

using System; using System.Collections.Generic; class Program { static void Mai

using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
List menu = new List();
while (true)
{
Console.WriteLine(“Restaurant Menu Management System”);
Console.WriteLine(“1. Add Menu Item”);
Console.WriteLine(“2. Display Menu”);
Console.WriteLine(“3. Exit”);
Console.Write(“Enter your choice: “);
if (int.TryParse(Console.ReadLine(), out int choice))
{
switch (choice)
{
case 1:
AddMenuItem(menu);
break;
case 2:
DisplayMenu(menu);
break;
case 3:
Environment.Exit(0);
break;
default:
Console.WriteLine(“Invalid choice. Please try again.”);
break;
}
}
else
{
Console.WriteLine(“Invalid input. Please enter a number.”);
}
}
}
static void AddMenuItem(List menu)
{
Console.Write(“Enter the item name: “);
string name = Console.ReadLine();
Console.Write(“Enter the item description: “);
string description = Console.ReadLine();
Console.Write(“Enter the item price: “);
if (decimal.TryParse(Console.ReadLine(), out decimal price))
{
MenuItem menuItem = new MenuItem(name, description, price);
menu.Add(menuItem);
Console.WriteLine(“Item added to the menu.”);
}
else
{
Console.WriteLine(“Invalid price. Please enter a valid number.”);
}
}
static void DisplayMenu(List menu)
{
Console.WriteLine(“Restaurant Menu:”);
foreach (MenuItem item in menu)
{
Console.WriteLine($”{item.Name} – {item.Description} – ${item.Price}”);
}
}
}
class MenuItem
{
public string Name { get; }
public string Description { get; }
public decimal Price { get; }
public MenuItem(string name, string description, decimal price)
{
Name = name;
Description = description;
Price = price;
}
}

Posted in C++

using System; using System.Collections.Generic; class Program { static void Mai

using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
List menu = new List();
while (true)
{
Console.WriteLine(“Restaurant Menu Management System”);
Console.WriteLine(“1. Add Menu Item”);
Console.WriteLine(“2. Display Menu”);
Console.WriteLine(“3. Exit”);
Console.Write(“Enter your choice: “);
if (int.TryParse(Console.ReadLine(), out int choice))
{
switch (choice)
{
case 1:
AddMenuItem(menu);
break;
case 2:
DisplayMenu(menu);
break;
case 3:
Environment.Exit(0);
break;
default:
Console.WriteLine(“Invalid choice. Please try again.”);
break;
}
}
else
{
Console.WriteLine(“Invalid input. Please enter a number.”);
}
}
}
static void AddMenuItem(List menu)
{
Console.Write(“Enter the item name: “);
string name = Console.ReadLine();
Console.Write(“Enter the item description: “);
string description = Console.ReadLine();
Console.Write(“Enter the item price: “);
if (decimal.TryParse(Console.ReadLine(), out decimal price))
{
MenuItem menuItem = new MenuItem(name, description, price);
menu.Add(menuItem);
Console.WriteLine(“Item added to the menu.”);
}
else
{
Console.WriteLine(“Invalid price. Please enter a valid number.”);
}
}
static void DisplayMenu(List menu)
{
Console.WriteLine(“Restaurant Menu:”);
foreach (MenuItem item in menu)
{
Console.WriteLine($”{item.Name} – {item.Description} – ${item.Price}”);
}
}
}
class MenuItem
{
public string Name { get; }
public string Description { get; }
public decimal Price { get; }
public MenuItem(string name, string description, decimal price)
{
Name = name;
Description = description;
Price = price;
}
}

Posted in C++

https://github.com/fromlc/ex4_jumping_bean.git InstructionsWrite a for loop to m

https://github.com/fromlc/ex4_jumping_bean.git
InstructionsWrite a for loop to make the Jumping Bean app work.
Edit the .cpp file with your for loop code.
Get the code to run – fix all syntax errors and warnings. I’m here to help you with this, just ask.
Submit your completed .cpp file.
Rubric
Exercise Code Rubric
Exercise Code Rubric
CriteriaRatingsPts
This criterion is linked to a Learning OutcomeCode compiles cleanly
5 ptsAwesome!
3 ptsNot yet
5 pts
This criterion is linked to a Learning OutcomeFor loop correctFor loop syntax is correct, loop iterates correct number of times
5 ptsSyntax ninja!
0 ptsNot yet
5 pts
This criterion is linked to a Learning OutcomeCorrect use of rand() function and modulus divisionRandom numbers generated in correct range
3 ptsrand() guru
2 ptsNot yet
3 pts
This criterion is linked to a Learning OutcomeCoding style correctCorrect indentation, correct variable names
2 ptsPro style
1 ptsNot yet
2 pts
Total Points: 15

Posted in C++

InstructionsCreate a C++ app that races Go-Karts. Implement the following featur

InstructionsCreate a C++ app that races Go-Karts. Implement the following features:
The human user races the computer until the human wants to quit
User requests the number of laps for each race
App terminates when user requests 0 laps
Generate a random speed for each lap, for each racer
Make the random lap speed between 50mph and 80mph
Display the both racers’ speeds for each lap
The highest average speed wins the race
Display how many races each racer has won
Sample Output
What to SubmitSubmit one .cpp file with your completed app.
Your submitted code should compile with no errors or warnings, and your app should run without crashing.
Reach out to me for help whenever you need it.
Exercise 4: For Loop Practice” style=”float: left;” rel=”float: left;”>Previous

Posted in C++

C:UsersdareeAppDataLocalTempTemp7c998f50-c1fb-44c8-ac4f-57d4542b4a68_ex4_j

C:UsersdareeAppDataLocalTempTemp7c998f50-c1fb-44c8-ac4f-57d4542b4a68_ex4_jumping_bean-main (3).zipex4_jumping_bean-mainex4_jumping_bean.cpp
Edit the .cpp file with your for loop code.
Get the code to run – fix all syntax errors and warnings. I’m here to help you with this, just ask.
Submit your completed .cpp file.

Posted in C++