Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Calculate the total price based on several key parts required to build a state-o

ID: 3759383 • Letter: C

Question

Calculate the total price based on several key parts required to build a state-of-the-art gaming computer. The user will have the option of selecting different parts. For example, Windows 7, Windows 8 or Mac OS/X for Operating systems, 4 GB, 8 GB or 12 GB for RAM and 15”,17” or 22” Monitors. There are 5 components of your submission including: Program Description- A detailed, clear description of the program you are building. Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations that might be needed. You should talk about how you determined your computer part prices. Test plan - Prepare at least 3 sets of input data (Test data) along with their expected output for testing your program. Your test data can be presented in the form of a table as follows (note: feel free to adapt to your design) Flowchart – Provide a flowchart for your design. You can use Word, Powerpoint, Visio or any software you have available that will allow to draw shapes and connectors. Pseudocode- Provide pseudocode of your overall design that fulfills the requirements of the project

Explanation / Answer

#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

int main ()
{

char CPU, RAM, monitor, graphicsCard;
float price_CPU, price_RAM, price_monitor, price_graphicsCard;
float totalPrice;

//Initialize variables
price_CPU = 0;
price_RAM = 0;
price_monitor = 0;
price_graphicsCard = 0;
totalPrice = 0;

//Get user input
cin >> CPU;

if (CPU == 'a')
price_CPU=400;
else if (CPU == 'b')
price_CPU=187;

cin >> RAM;
if (RAM == 'c')
price_RAM=85;
else if (RAM == 'd')
price_RAM =165;
else if (RAM == 'e')
price_RAM =350;

cin >> monitor;
if (monitor == 'f')
price_monitor=90;
else if (monitor == 'g')
price_ monitor =350;
else if (monitor == 'h')
price_ monitor =500;


cin >> graphicsCard ;
if (graphicsCard == 'i')
price_graphicsCard=330;
else if (graphicsCard == 'j')
price_ graphicsCard =500;


totalPrice = 803 + price_CPU + price_RAM + price_monitor + price_graphicsCard;

//Output Total Price
cout << fixed << "Total Price of your Gaming Computer is " << setprecision(6) << totalPrice;

return 0;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote