Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Microsoft Visual Studio 2017 C++, design and develop a program of your own

ID: 3919881 • Letter: U

Question

Using Microsoft Visual Studio 2017 C++, design and develop a program of your own design and choosing that is NOT a banking system. There is a list of ideas below, but you can come up with your own idea. Read all the instructions very carefully and review the grading rubric for this assignment. The grading rubric will be used to grade your final project. Your program must be original and not based on any assignments in this or any other course. This project is also assessing your ability to problem solve: Can you design a program from the topics below? Suggested Topics: • Statistics (sports, video games, etc...) • Business (accounting, warehousing, retail, etc...) • Home inventory system (inventory your belongings, your film collection, your music collection, your antiques collection, etc...) • Dictionary (Spanish-English, Thesaurus, Quotes, rhymes, Scrabble, etc…) • Personal finance (Expense tracker, check book, Monthly budget) • Personal development (calorie tracker, exercise log, to do list, etc…) Grading Rubric for This Assignment: ?Criteria Range – Low End (Did not do or did very little effort) Range – High End (Used correctly and spent time/effort on programming) Names of variables are meaningful and the program comments self-document the program. 0 5 Program documentation includes instructions on how to use the program 0 5 Math operations (for max points use built-in math functions) NOTE: Increment does not count as a math operation. 0 5 Class type in a separate .h file with member functions (accessor functions, get, set, show, display find, etc.) For full points, include an overloaded function 0 20 Base/Derived classes or a template 0 10 Binary file 0 5 User instructions are clear 0 10 Program design is logical and well-organized 0 10 Provide screen shots of the program executed with 3 sets of test data. 0 5 Validated user input 0 5 Formatted the output so it is easy to read and aligned 0 5 The program executes without error and the output is correct 0 10 The zipped program folder and screens shots of the code and console are uploaded to dropbox. 0 5 ?Total Points Possible 0 ?100

Explanation / Answer

using namespace st;

class item
{
private:
char name[15];
int code[15];
float price[15];
int z;
public:
void add_(void);
void delete_(void);
void sell_(void);
void display_(void);
void initial(void){z=0;}

};
void item :: add_(void)
{
clrscr();
cout<<" Enter the item category : ";
cin>>name[z];
cout<<"Enter the item code : ";
cin>>code[z];
cout<<"Enter the price of the item: ";
cin>>price[z];
z++;
}


void item :: delete_(void)
{
int i,j;
clrscr();

cout<<" Please enter the item code:";
cin>>i;
for(j=0;j<z;j++)
{
if(code[j]==i)
{
price[j]=0;
cout<<" The item is deleted from the list.";
getch();
break;
}
}
}

void item :: sell_(void)
{
char a;
int i,j;
float total_price=0;
clrscr();

cout<<" Enter the item code:";
cin>>i;
for(j=0;j<z;j++)
{
if (code[j]==i)
{
if(price[j]==0)
{
cout<<" Sorry.There is no item left in this category.";
cout<<" Do you want to buy another item? y "<<endl;
cin>>a;
if (a=='y')
{
cout<<" Enter the item code:";
cin>>i;
j=-1;
}
else if (a=='Y')
{
cout<<" Enter the item code:";
cin>>i;
j=-1;
}
else
{
if (total_price!=0)
{
cout<<" Your total price is: ";
cout<<total_price<<" Taka."<<" Thank You.";
}
cout<<"Bye...bye...";
break;
}
}
else
{
cout<<"Item category is: "<<name[j];
cout<<" Item price is : "<<price[j]<<"tk."<<endl;
total_price+=price[j];
price[j]=0;
cout<<" Do you want to buy another item:y ";
cin>>a;
if (a=='y')
{
cout<<" Enter the item code:";
cin>>i;
j=-1;
}
else if (a=='Y')
{
cout<<" Enter the item code:";
cin>>i;
j=-1;
}
else
{ clrscr();
cout<<" Your total price is: ";
cout<<total_price<<"Taka."<<" Thank You.";
break;
}
}
}
}
getch();
}

void item :: display_()
{
int i,j=1;
clrscr();

for(i=0;i<z;i++)
{
cout<<j<<".Item category is: "<<name[i];
cout<<" Item code is : "<<code[i];
cout<<" Item price is : "<<price[i]<<"tk."<<endl<<endl;
j++;
}
getch();
}


int main ()

{
int i;
item shoping_mall;
clrscr();

shoping_mall.initial();

while(1)
{
cout<<" What do you want to do?"<<endl;
cout<<" 1: Add a new item.";
cout<<" 2: Delete an item.";
cout<<" 3: Sale an item.";
cout<<" 4: Display all items.";
cout<<" 5: Exit"<<endl;
cout<<" Choose a number:";
cin>>i;

switch(i)
{
case 1:
{
shoping_mall.add_();
break;
}
case 2:
{
shoping_mall.delete_();
break;
}
case 3:
{
shoping_mall.sell_();
break;
}
case 4:
{
shoping_mall.display_();
break;
}

case 5:
{
cout<<"Good Bye! Thank you.";
break;
}
}
if (i==5)
break;
clrscr();
}
getch();
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote