Question
C++ FlashDrive PLEASE show 3 files!!!! 1---main.cpp 2---flashdrive_2_0.h 3---flashdrive_2_0.cpp FlashDrive Sample Driver Code FlashDrive( ); FlashDrive( int capacity, int used, bool pluggedIn ); void plugIn(
C++ FlashDrive
PLEASE show 3 files!!!!
1---main.cpp
2---flashdrive_2_0.h
3---flashdrive_2_0.cpp
FlashDrive | Sample Driver Code |
FlashDrive( ); FlashDrive( int capacity, int used, bool pluggedIn ); void plugIn( ); void pullOut( ); void writeData( int amount ); void eraseData( int amount ); void formatDrive( ); int getCapacity( ); void setCapacity( int amount ); int getUsed( ); void setUsed( int amount ); bool isPluggedIn( ); | #include #include "FlashDrive.h" using namespace std; using namespace cs52; void main( ) { cs52::FlashDrive drive1( 10, 0, false ); cs52::FlashDrive drive2( 20, 0, false ); drive1.plugIn( ); drive1.formatDrive( ); drive1.writeData( 5 ); drive1.pullOut( ); drive2.plugIn( ); drive2.formatDrive( ); drive2.writeData( 1 ); drive2.pullOut( ); cs52::FlashDrive combined = drive1 + drive2; cout if (combined > other) { cout other) { cout if (drive2 |
int my_StorageCapacity; int my_StorageUsed; bool my_IsPluggedIn; |
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