Question: I have a code I am writing in c++ visual studio and I am not sure how to go about these steps... Store and print

I have a code I am writing in c++ visual studio and I am not sure how to go about these steps...

  • Store and print a list of bottles that is part of someones collection. You will get the list of bottles from a text file. Ive provided a couple text files for you. We will grade with big.txt.

// Read from the file and print it out.

// Add bottle class including .h / .cpp.
// change the read of the file to fill a single bottle.
// move the print to the bottle class and print my single bottle.

// made my print look nicer.

Text files can be anything really, as long as its taking from

  • Your text file reading doesnt need to be fancy. The data is space delimited.
  • There is a maximum of 30 records in the file. Make and use a constant for this.
  • You may use the string class for any text variables.
  • Use functions and methods in a logical way. Dont have big functions or methods.
  • Your classes and structures must:
    • Each have their own .h and .cpp. Only methods that are 1 line may be inline (in the .h)
    • Be const correct. Dont underestimate the work of this the first-time round. (It will be easier if you make it a habit and just start const correct.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!