Answered step by step
Verified Expert Solution
Question
1 Approved Answer
My goal is to store and collect a list of bottles and display that information using classes, I was wondering if anyone could help complete
My goal is to store and collect a list of bottles and display that information using classes, I was wondering if anyone could help complete my code? (Written in c++)
Here is all of my code I have written so far, anything you can suggest will help!
// CST126_2_91.cpp : This file contains the 'main' function. #include "bottle.h" using namespace std; Untitled - Notepad #define maximum 30 File Edit Format View Help bottle globalArray[maximum); //bottle.cpp// bool Open InputFile(ifstream& input_file, string filename); #include "bottle.h" void readfile(ifstream& input_file); bottle:: bottle() { bool Open InputFile(ifstream& input_file, string filename) m_color = ""; m_type = ""; input_file.open(filename); m_age = 0; m_value = 0.0; if (input_file.fail() bottle:: bottle(const string& color, const string& type, int age, double value) { cout // string operation void readfile(ifstream& infile) { #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started