Final Report

Read Complete Research Material

FINAL REPORT

Final Report

Final Report

The present paper is characterized by comprising a microprocessor-based vending machine in which the vast majority of functions previously performed by separate and independent vending machine subassemblies are now concentrated within themicroprocessor, thus eliminating the need to provide each such subassembly with its own electronic control, thereby significantly reducing the size and complexity of each of the required subassemblies, by reducing the components of such subassemblies toa practical minimum. In addition to the above, the microprocessor is uniquely designed to provide a significant increase in the number of vending apparatus functions not heretofore incorporated in conventional vending apparatus and this may be achieved withoutsignificantly increasing the complexity of the microprocessor or its interfacing circuitry.

The vending apparatus, in one preferred embodiment, comprises a coin acceptor and change-dispensing unit whose control capability has been incorporated in the microprocessor; manually operable item-selection switches; and dispensing devices fordispensing a large plurality of different packaged items whose control capability is also integrated into the microprocessor which constantly monitors the selection switches to exert control over the desired dispensing device.

In addition to the above functions, the microprocessor constantly scans all of the dispensing devices to monitor their condition and disable the dispensing device identified as malfunctioning and prevent selection of such device by a vendingmachine user, to thereby prevent the vending machine user from becoming frustrated by repeated attempts to select a packaged item dispensed by a malfunctioning dispensing device. Although a malfunctioning dispensing device is prevented from beingselected by a user, the remaining dispensing devices may be operated in the normal fashion.

All other vending machine functions are monitored on a regular basis to assure their proper operation. The microprocessor stores signals in memory representing those malfunctioning units, some of which signals are utilized to create alarms whichare not cleared until the malfunctioning unit has been repaired or replaced and some of which may be displayed on demand, usually by generation of a display request.

#include

#include

using namespace std;

int main()

{

char money;

double totalm = 0;

double value = 0, valued = 0, valuen = 0, valueq = 0, valueb = 0;

int c1=0, c2=0, c3=0, c4=0, c5=0, c6=0;

int C1=0, C2=0, C3=0, C4=0, C5=0, C6=0;

int item;

cout<<"======Welcome to TD'S Vending======"<
cout<<" Depost Money "<
cout<<" Enter n or N for Nickel "<
cout<<" Enter d or D for Dime "<
cout<<" Enter q or Q for Quarter "<
cout<<" Enter b or B for Dollar Bill "<
cout<<" Enter e to end the deposit "<
cin>>money;

while(money!='e' && money!='E')

{

if(money=='n' || money=='N')

{

double valuen=0.05;

totalm+=valuen;

cout<<"nickel is deposited, the total money deposited is "<
cin>>money;

}

if(money=='d' || money=='D')

{

double valued=0.10;

totalm+=valued;

cout<<"dime is deposited, the total money deposited is "<
cin>>money;

}

if(money=='q' || money=='Q')

{

double valueq=0.25;

totalm+=valueq;

cout<<"quarter is deposited, the total money deposited is "<
cin>>money;

}

if(money=='b' || money=='B')

{

double valueb=1.00;

totalm+=valueb;

cout<<"dollar is deposited, the total money deposited is "<
cin>>money;

}

else

{

cout<<"invalid entry, please try again"<
cin>>money;

}

}

cout<<"=========Welcome to TD'S Vending========="<
cout<<" Snickers Goose Condom "<
cout<<" $0.85 $2.00 $1.50 "<
cout<<" C1 C2 C3 "<
cout<<" Chips Dutch Mint "<
cout<<" $0.50 $1.00 $0.25 "<
cout<<" C4 C5 C6 "<
cout<<"========================================="<
cout<<"Please enter item number"<
cin>>item;

if (item==c1||C1)

{

double S=0.85;

float change=0;

if(totalm>=S)

{

cout<<"Snickers is purchased"<
change=totalm-S;

cout<<"Money deposited is"<
cout<<"Thank You"<
}

else

{

}

if (item==c2||C2)

{

float ...
Related Ads