plz help me. give me codes of .h ;at least 2 answers I have provided you with a
ID: 3664196 • Letter: P
Question
plz help me. give me codes of .h ;at least 2 answers
I have provided you with a sample class named FlashDrive which has been diagrammed below. You can acquire the source to theFlashDrive class by clicking on the correct link for their development platform ( VS2010 VS2012 XCode5 XCode6 XCode7 ). For this unit, I'd like you to identify additional member variables (data) that would be appropriate for the class FlashDrive. I would also like you to identify additional methods (functions) that would be appropriate for the class FlashDrive. Update and resubmit the .h file forFlashDrive with the new possible methods and members you have identified commented and explained.
YOU ARE NOT REQUIRED TO CODE UP ANYTHING MORE THAN THE .H FILE CHANGES, ALTHOUGH YOU ARE WELCOME TO DO MORE THAN THIS IF YOU WISH.
Class Details
Sample Driver
FlashDrive
FlashDrive();
FlashDrive( int capacity, int size,bool pluggedIn );
void setCapacity( int amount );
int getCapacity( );
void setUsed( int amount );
int getUsed( );
bool isPluggedIn( );
void plugIn();
void pullOut();
void writeData( int amount );
void eraseData( int amount );
void formatDrive( );
int my_Size;
int my_Contents;
bool my_IsPluggedIn;
int main() {
int i;
cout << "Welcome to Howie's Flash USB Drive Store!" << endl;
cout << "How much memory do you need? ";
cin >> i;
FlashDrive f( i, 0, false );
cout << "Let's format the drive..." << endl;
f.formatDrive( );
cout << "Let's plug in the drive..." << endl;
f.plugIn( );
cout << "Let's write some data..." << endl;
f.writeData( 10 );
cout << "Let's unplug the drive..." << endl;
f.pullOut( );
cout << "Enjoy your drive!" << endl;
return( 0 );
}
Class Details
Sample Driver
FlashDrive
FlashDrive();
FlashDrive( int capacity, int size,bool pluggedIn );
void setCapacity( int amount );
int getCapacity( );
void setUsed( int amount );
int getUsed( );
bool isPluggedIn( );
void plugIn();
void pullOut();
void writeData( int amount );
void eraseData( int amount );
void formatDrive( );
int my_Size;
int my_Contents;
bool my_IsPluggedIn;
#include "FlashDrive.h"
using namespace std;
int main() {
int i;
cout << "Welcome to Howie's Flash USB Drive Store!" << endl;
cout << "How much memory do you need? ";
cin >> i;
FlashDrive f( i, 0, false );
cout << "Let's format the drive..." << endl;
f.formatDrive( );
cout << "Let's plug in the drive..." << endl;
f.plugIn( );
cout << "Let's write some data..." << endl;
f.writeData( 10 );
cout << "Let's unplug the drive..." << endl;
f.pullOut( );
cout << "Enjoy your drive!" << endl;
return( 0 );
}
Explanation / Answer
I have been identified two additional parameters are for FlashDrive ..these are Secuirty and transfer Speed ..
See the below classification in addition to exiting data members and functions .i Have added these are listed below with explanation..
Security:
getEncrypted ()
bool isEncrypt
Many USB flash drives come with some degree of component-level encryption security, pre-installed, to protect sensitive files.
Transfer Speed
getTransferSpeed()
int trsns_speed is a data member
If using a USB flash drive on a daily basis to transfer large files of more than just a few kilobytes, the transfer speed is an important factor to consider.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.