Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help on my homework, I need C++ code. Here is the question The Golden Bottle Vineyard has asked you to create an application

I need help on my homework, I need C++ code. Here is the question

The Golden Bottle Vineyard has asked you to create an application to assist them in taking routine inventories. Their wine racks consist of columns. However, due to the unique design, each column has a different height. Create a C++ console application to ask the user how many columns they want to include in the inventory. Ask for the number of cubes in each column, one at a time, by specifying the column number, starting from one. Then, ask for the number of bottles in that column. However, every 5th column is always left empty to separate different wine categories. Do not ask for those column numbers.

After completing the questions, display the total number of cubes, number of bottles, number of empty cubes, and percentage of full and empty cubes.

Requirements:

  • Include your name plus the lab name in the name of the project.
  • Follow all standard requirements discussed in previous assignments.
  • Do not accept negative numbers. Number of bottles in a column cannot be greater that total cubes in that column.
  • Naturally, number of columns, cubes, and bottles are always integers.
  • DO NOT use continue , break, or return statements to manipulate your loops.

How to do it:

  • After getting the number of columns, ask the questions in a loop. A for-loop is the best.
  • Use accumulator variables for total cubes and bottles.
  • Use modulus division to decide which columns to skip. Use logic, NOT continue.
  • Use static_cast when calculating the percentages.

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_2

Step: 3

blur-text-image_3

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions