0% found this document useful (0 votes)
22 views19 pages

Cat3 Record

The document outlines the preparation of state chart and collaboration diagrams for a sales and marketing system, detailing hardware and software requirements. It also includes code samples for class generation from designed OOAD diagrams, featuring classes for products, customers, admins, and salespersons. The conclusion states that the diagrams and code have been successfully generated.

Uploaded by

Geethaguru Guru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views19 pages

Cat3 Record

The document outlines the preparation of state chart and collaboration diagrams for a sales and marketing system, detailing hardware and software requirements. It also includes code samples for class generation from designed OOAD diagrams, featuring classes for products, customers, admins, and salespersons. The conclusion states that the diagrams and code have been successfully generated.

Uploaded by

Geethaguru Guru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

EX NO:9 STATE CHART DIAGRAM

AIM:

To prepare state chart diagram for the sales and marketing system.

REQUIREMENTS:
HARDWARE INTERFACES:
 Intel ® Core i3 processor or higher.
 4GB RAM or higher
 2.40 GHz processor or higher
 Keyboard and Mouse
 Screen Resolution of about 1900 x 800 px

SOFTWARE INTERFACES:
 Windows 10 OS
 Lucid Chart diagramming Tool

DIAGRAM:
Forecasting sales
Development of sales:

CONCLUSION:
The state chart diagram for the sales and marketing system has been drawn successfully.
EX NO:10 COLLABORATION DIAGRAM FOR THE
SALES AND MARKETING SYSTEM

AIM:
To draw a Collaboration Diagram for the Sales and Marketing System.

REQUIREMENTS:
HARDWARE INTERFACES:
 Intel ® Core i3 processor or higher.
 4GB RAM or higher
 2.40 GHz processor or higher
 Keyboard and Mouse
 Screen Resolution of about 1900 x 800 px

SOFTWARE INTERFACES:
 Windows 10 OS
 Lucid Chart diagramming Tool

DIAGRAM:
Forecast sales:
Development of sales

Incentive Calculation
EX NO.10 CLASS CODE GENERATION FOR THE
SALES AND MARKETING SYSTEM

AIM:
To auto generate code from the designed OOAD DIAGRAMS.

REQUIREMENTS:
HARDWARE INTERFACES:
 Intel ® Core i3 processor or higher.
 4GB RAM or higher
 2.40 GHz processor or higher
 Keyboard and Mouse
 Screen Resolution of about 1900 x 800 px

SOFTWARE INTERFACES:
 Windows 10 OS
 Argo UML to generate code

CODE SAMPLES:
using namespace std;

#include<iostream>

#include<conio.h>

#include<string>

class product

private:

int pid;

string pname;

int cost;

int weight;

int no;

public:

void makeProducts()
{

cout<<"ENTER PRODUCT DETAILS:\n\n";

cout<<"ENTER PRODUCT ID:";

cin>>pid;

cout<<"ENTER PRODUCT NAME:";

cin>>pname;

cout<<"ENTER COST:";

cin>>cost;

cout<<"ENTER WEIGHT:";

cin>>weight;

cout<<"ENTER NUMBER OF PRODUCT TO BE


ADDED TO STOCK:";

cin>>no;

void dispProdDetails()

cout<<"PRODUCT DETAILS:\n\n";

cout<<"PRODUCT ID:"<<pid<<"\n";

cout<<"PRODUCT NAME:"<<pname<<"\n";;

cout<<"COST:"<<cost<<"\n";;

cout<<"ENTER WEIGHT:"<<weight<<"\n";

int retCost()

return cost;

int Weight()

return weight;

};
class customer

private:

int CID;

string Cname;

string email;

string contactno;

string Caddr;

int ordercount;

string password;

public:

customer()

CID=123;

password="customer";

bool custlogin(int custid,string custpass)

if(custpass==password &&
custid==CID)

return true;

else

return false;

void customermenu()

int opt1;

cout<<"\n\t\tSELECT YOUR OPERATION";

cout<<"\n\t\t1.REGISTER CUSTOMER";
cout<<"\n\t\t2.VIEW DETAILS";

cout<<"\n\t\t3.ADD PRODUCTS";

cout<<"\n\t\t4.CHECKOUT";

cout<<"\n\t\t5.LOGOUT";

cout<<"\n\t\tENTER YOUR CHOICE:";

cin>>opt1;

switch(opt1)

case 1:

cout<<"\n\t\tCUSTOMER
REGISTRATION";

getData();

break;

case 2:

cout<<"\n\t\tCUSTOMER
DISPLAY DETAILS:";

dispData();

break;

case 3:

cout<<"\n\t\tENTER
PRODUCT ID:";

cout<<"\n\t\tENTER
PRODUCT NAME:";

cout<<"\n\t\tSEARCHING...";

break;

case 4:

int qty,cost,amt;

cout<<"\n\t\tPROCEEDING
TO PAYMENT";

cout<<"\n\t\tENTER
QUANTITY";

cin>>qty;

cout<<"\n\t\tENTER UNIT
PRICE";

cin>>cost;

amt=qty*cost;
cout<<"BILL
AMOUNT="<<amt;

break;

case 5:

exit(0);

break;

default:

cout<<"\nTRY AGAIN";

break;

void getData()

cout<<"ENTER CUTOMER DETAILS:\n\n";

cout<<"ENTER CUSTOMER ID NUMBER:";

cin>>CID;

cout<<"ENTER CUSTOMER NAME:";

cin>>Cname;

cout<<"ENTER CUSTOMER EMAIL:";

cin>>email;

cout<<"ENTER CONTACT NUMBER:";

cin>>contactno;

cout<<"ENTER CUSTOMER ADDRESS:";

cin>>Caddr;

if(!cin)

cout<<"\n\nWHOA!! BAD INPUT TRY


AGAIN";

}
void dispData()

cout<<"CUSTOMER DETAILS:\n\n\n";

cout<<"CUTOMER ID NUMBER:"<<CID<<"\n\n";

cout<<"ENTER CUSTOMER NAME:"<<Cname<<"\n\


n";

cout<<"ENTER CUSTOMER EMAIL:"<<email<<"\n\n";

cout<<"ENTER CONTACT NUMBER:"<<contactno<<"\


n\n";

cout<<"ENTER CONTACT ADDRESS:"<<Caddr<<"\n\


n";

bool validateDetails(customer obj)

bool isMobileNumber = obj.contactno.size() == 10 &&


obj.contactno[0] == '9'|| obj.contactno[1]=='8';

if(isMobileNumber!=true)

cout<<"PLEASE ENTER VALID PHONE


NUMBER\n\n";

return false;

void orderr()

ordercount++;

void placeOrder()

{
}

void viewOrder()

};

class admin

private:

int adminid;

string password;

public:

admin()

adminid=123;

password="admin";

target=89000;

bool adminlogin(int adminid,string adminpass)

if(adminpass==password &&
adminid==adminid)

return true;

else

return false;

void adminmenu()

int opt;
cout<<"\n\t\tSELECT YOUR OPERATION";

cout<<"\n\t\t1.FORECAST SALES";

cout<<"\n\t\t2.SET TARGET";

cout<<"\n\t\t3.CHECK TARGET STATUS";

cout<<"\n\t\t4.ADD INCENTIVES";

cout<<"\n\t\t5.LOGOUT";

cout<<"\n\t\tENTER YOUR CHOICE:";

cin>>opt;

switch(opt)

case 1:

cout<<"\n\t\tANALYSING
PREVIOUS SALES REPORTS...";

cout<<"\n\t\tFORECASTED
SALES="<<target;

break;

case 2:

cout<<"\n\t\tTARGET -2k19";

cout<<"\n\t\t\t"<<target;

cout<<"\n\t\tTARGET PER
SALES PERSON PER MONTH==> "<<target/10;

break;

case 3:

cout<<"\n\t\tENTER SALES
PERSON ID TO CHECK TARGET:";

break;

case 4:

cout<<"\n\t\
tINCENTIVES=5/100*achieved number of targets";

break;

case 5:

cout<<"\n\t\tLOGGING OUT
OF ADMIN";

break;

default:
cout<<"\nTRY AGAIN";

break;

};

class salesperson

private:

int sid;

string spassw;

public:

salesperson()

sid=123;

spassw="sales";

bool salelogin(int salesid,string salepass)

if(salepass==spassw && salesid==sid)

return true;

else

return false;

void salesmenu()

int opt;

cout<<"\n\t\tSELECT YOUR OPERATION";

cout<<"\n\t\t1.SEND PROMOTIONS";
cout<<"\n\t\t1.UPDATE TARGET";

cout<<"\n\t\t5.LOGOUT";

cout<<"\n\t\tENTER YOUR CHOICE:";

cin>>opt;

switch(opt)

case 1:

cout<<"\n\t\tSALES
PROMOTIONS SENT TO CUSTOMER";

break;

case 2:

cout<<"\n\t\tTARGET
STATUS UPDATED";

break;

case 5:

cout<<"\n\t\tLOGGING OUT
OF SALESPERSON";

break;

default:

cout<<"\nTRY AGAIN";

break;

};

int main()

int i,ch,y,user,ans;

bool flag;

customer c[100];

menu:

cout<<"\t\t\tWELCOME TO ABC SALES AND


MARKETING\t\t\t\n";
cout<<"\n\t\tSELECT USER:";

cout<<"\n\t\t1.ADMIN";

cout<<"\n\t\t2.CUSTOMER";

cout<<"\n\t\t3.SALES EXECUTIVE";

cout<<"\n\t\t ENTER CHOICE:";

cin>>user;

switch(user)

case 1:

int adminid;

char n;

admin a;

string adminpass;

system("CLS");

cout<<"\n\t\tENTER
ADMIN DETAILS TO CONTINUE:";

cout<<"\n\t\tENTER
ADMIN ID:";

cin>>adminid;

cout<<"\n\t\tENTER
PASSWORD:";

cin>>adminpass;

cout<<"\nPlease wait
while we validate your login...";

if(a.adminlogin(adminid,adminpass)==true)

cout<<"LOGIN SUCCESS";

do

a.adminmenu();

cout<<"DO YOU WANT TO CONTINUEy/n";

cin>>n;
}while(n=='y'
);

else

cout<<"\n\t\
tINVALID CREDENTIALS"; //yet

break;

case 2:

int custid;

customer c1;

char n;

string custpass;

system("CLS");

cout<<"\n\t\tENTER
CUSTOMER DETAILS TO CONTINUE:";

cout<<"\n\t\tENTER
CUSTOMER ID:";

cin>>custid;

cout<<"\n\t\tENTER
PASSWORD:";

cin>>custpass;

cout<<"\nPlease wait
while we validate your login...";

if(c1.custlogin(custid,custpass)==true)

cout<<"LOGIN SUCCESS";

do

c1.customermenu();

cout<<"DO YOU WANT TO CONTINUEy/n";


cin>>n;

}while(n=='y'
);

else

cout<<"\n\t\
tINVALID CREDENTIALS"; //yet

break;

case 3:

char n;

int salesid;

salesperson s;

string salepass;

system("CLS");

cout<<"\n\t\tENTER
CUSTOMER DETAILS TO CONTINUE:";

cout<<"\n\t\tENTER
CUSTOMER ID:";

cin>>salesid;

cout<<"\n\t\tENTER
PASSWORD:";

cin>>salepass;

cout<<"\nPlease wait
while we validate your login...";

if(s.salelogin(salesid,salepass)==true)

cout<<"LOGIN SUCCESS";

do

s.salesmenu();
cout<<"DO YOU WANT TO CONTINUEy/n";

cin>>n;

}while(n=='y'
);

else

cout<<"\n\t\
tINVALID CREDENTIALS"; //yet

break;

OUTPUT:

CONCLUSION:
The code for the give class diagram of the sales and marketing system has been auto
generated in Argo UML

You might also like