Consoleapplication:
using
System;
using
System.Collections.Generic;
using
System.Text;
using
customer;
using
computer;
using
computerdetails;
using
invoice;
using
orderclass;
using
bill;
namespace
ConsoleApplication
{
class
Program
{
static
void Main(string[] args)
{
string
i;
int h;
Console.WriteLine("ONLINE
SHOPPING");
Console.WriteLine("COMPUTER
SALE");
Console.WriteLine("1.VIEW
CATALOGUE");
Console.WriteLine("2.EXIT");
Console.WriteLine("ENTER
YOUR CHOICE");
i =
Console.ReadLine();
h = int.Parse(i);
switch
(h)
{
case 1:
{
com o2
= new com();
o2.display1();
co_det
O3 = new co_det();
O3.detail3();
cus o1
= new cus();
o1.display();
Corder
o4 = new Corder();
o4.display4();
inv
o5=new inv();
o5.display5();
bll x1
= new bll();
x1.billdisp();
Console.ReadLine();
}
break;
case 2:
break;
}}}}
Components:
computer:
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
computer
{
public
class com
{
int a;
public
void display1()
{
Console.WriteLine("COMPUTERS");
Console.WriteLine("1.dell");
Console.WriteLine("2.hcl");
Console.WriteLine("3.lava");
Console.WriteLine("4.sony");
Console.WriteLine("5.samsung");
}}}
Component:
computer details:
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
computerdetails
{
public
class co_det
{
int d;
string
w;
public
void detail3()
{
Console.WriteLine("SELECT
YOUR DESIRED COMPUTER");
w=Console.ReadLine();
d=int.Parse(w);
switch
(d)
{
case 1:
{
Console.WriteLine("YOU
HAVE SELECTED DELL");
Console.WriteLine("ITEM
ID:09");
Console.WriteLine("ITEM
PRICE:34,000");
Console.WriteLine("MODEL:INSPIRON");
}
break;
case 2:
{
Console.WriteLine("YOU
HAVE SELECTED HCL");
Console.WriteLine("ITEM
ID:59");
Console.WriteLine("ITEM
PRICE:24,000");
Console.WriteLine("MODEL:ASPIRE");
}
break;
case 3:
{
Console.WriteLine("YOU
HAVE SELECTED LAVA");
Console.WriteLine("ITEM
ID:05");
Console.WriteLine("ITEM
PRICE:55,000");
Console.WriteLine("MODEL:LAVA");
}
break;
case 4:
{
Console.WriteLine("YOU
HAVE SELECTED SONY");
Console.WriteLine("ITEM
ID:75");
Console.WriteLine("ITEM
PRICE:23,000");
Console.WriteLine("MODEL:DEVINE");
}
break;
case 5:
{
Console.WriteLine("YOU
HAVE SELECTED SAMSUNG");
Console.WriteLine("ITEM
ID:03");
Console.WriteLine("ITEM
PRICE:65,000");
Console.WriteLine("MODEL:GALLERY");
}
break;
case 6:
break;
}}}}
Component:
customer:
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
customer
{
public
class cus
{
string
name;
string
add;
string phno;
string
email;
public void
display()
{
int q;
string
v;
Console.WriteLine("if
you have conformed with this product fill the customer form");
Console.WriteLine("1.yes/2.no");
v=Console.ReadLine();
q=int.Parse(v);
switch(q)
{
case 1:
{
Console.WriteLine("enter
your name:");
name =
Console.ReadLine();
Console.WriteLine("enter
your address:");
add =
Console.ReadLine();
Console.WriteLine("enter
your phone number:");
phno =
Console.ReadLine();
Console.WriteLine("enter
your email id:");
email =
Console.ReadLine();
Console.WriteLine("CHECK
YOUR DETAILS");
Console.WriteLine("");
Console.WriteLine("NAME={0}",
name);
Console.WriteLine("ADDRESS={0}",
add);
Console.WriteLine("PHONE
NUMBER={0}", phno);
Console.WriteLine("EMAIL
ID={0}", email);
Console.WriteLine("");
Console.ReadLine();
}
break;
case 2:
break;
}}}}
Component:
order:
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
orderclass
{
public
class Corder
{
int s;
string
f;
public
void display4()
{Console.WriteLine("select
payment method");
Console.WriteLine("1.CHEQUE/2.CASH");
f =
Console.ReadLine();
s =
int.Parse(f);
switch
(s)
{case
1:
{Console.WriteLine("enter
your account no:");
Console.ReadLine();
Console.WriteLine("name
of bank:");
Console.ReadLine();
Console.WriteLine("your
order conformed");}
break;
case 2:
{Console.WriteLine("your
order conformed");
}
break;
case 3:
break;
}}}}
Component:
invoice:
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
invoice
{public
class inv
{public
void display5()
{Console.WriteLine("YOUR
PRODUCT WILL BE DELIVERED ON 12.9.2011");
Console.ReadLine();
}}}
No comments:
Post a Comment