Thursday, December 28, 2023

METHOD OVERRIDING IN JAVA

   METHOD OVER RIDING IN JAVA WITH EXPLANATION


METHOD OVERRINDING :-
                                                         * Method overriding in java occurs when a sub class provides a specific implementation .For a method that is already defined in its super classes or other related sub classes.Thus if two different sub classes have the same method names ,its called method overriding.

                                                         *Although the names of the classes are different,but the names of the methods are same .This makes it difficult to understand by compiler in which method to use when the method calling time .

                                                         *  Here we can't call all the methods by using the least sub class's
objects like as usual.This can be overcome in many ways. Now let's see a one-of-a-kind logic in it.



PROGRAM  :

 package methodor;


public class Control {


public static void main(String[] args) {

// TODO Auto-generated method stub

Nature ob=new Nature ();

ob.action();

}


}

class Trees

{

void action()

{

System.out.println(" trees");

}

}

class Wind extends Trees

{

void action()

{

System.out.println("Wind");

}

}

class Nature extends Wind

{

void action()

{

System.out.println("Nature");

}

}

                                                 
I have created four classes in this program.It has one superclass and three sub-classes. According to the concept of an inheritance in java .we are using a keyword called extends ,to link each sub classes to each other.

class Trees

{

void action()

{

System.out.println(" trees");

}

}

class Wind extends Trees

{

void action()

{

System.out.println("Wind");

}

}

class Nature extends Wind

{

void action()

{

System.out.println("Nature");

}

}

Each sub-classes has different names.But each sub-classes has the same method names.Now i need to call each of the methods.We can't call the method names by using the least sub-class's object.

Nature ob=new Nature ();

ob.action();

Wind wi=new Wind();

wi.action();

Trees tr=new Trees();

tr.action();

Now over come it, Let's create an individual objects for each individual sub-classes.Now we can call the same named method by using an object created for that sub classes.    

full fine program;-    

package methodor;


public class Control {


public static void main(String[] args) {

// TODO Auto-generated method stub

Nature ob=new Nature ();

ob.action();

Wind wi=new Wind();

wi.action();

Trees tr=new Trees();

tr.action();

}


}

class Trees

{

void action()

{

System.out.println(" trees");

}

}

class Wind extends Trees

{

void action()

{

System.out.println("Wind");

}

}

class Nature extends Wind

{

void action()

{

System.out.println("Nature");

}

}

___________________________________________________________________________________
OUTPUT

Nature

Wind

trees

Monday, December 25, 2023

USING JAVA : COOL DRINKS VENDING MACHINE PROGRAM

 COOL DRINKS VENDING MACHINE PROGRAM BY USING JAVA 




Abstract:
              This project is a java related project.in this project we have designed how a vending machine can be programmed.And this  vending machine program is programmed to be user friendly.with this program the user can choose what soft drink they want .The program is programmed to display the price list of the soft drink of there choice.This program is programmed like how a vending machine only dispenses four drinks at a time.Then we use looping to determine whether the user wants to continue or exit.if the user want to continue the program starts again from the beginning with what soft drink you want to buy?.Otherwise the program will come out and display the total cost of soft drinks purchased by the user.The program is programmed as is the user pays for it.If the user pays the appropriate amount ,it will say "Take your drinks","Have a nice day".May be if user pays more the program way that the total amount is subtracted by the user wallet amount .the program will return the balance amount to the user  If the amount paid by user is below the appropriate amount. The program will display"not enough to pay "and the program will go to the payments enter section.If the user clicks anything wrong the specified values of soft drinks name ,price list and quantity.the program  will display the another matching response.   



package cooldrinks_vending_machine;

import java.util.Scanner;                                 //In java we use a class called Scanner to receive input from the user.To use that class we need to import this package in java.

public class Machine {                               

static int choice,qty,option=1;                                                                             
//When we refer to a Variables as Static.we can use its values and its names in all the sections in the program.
static float pur_cost,Total_cost=0,add_wallet=0,wallet_amount,bal_amt;

static void re_enter() {                                                                              
            //The program will enter this method.if the payment amount is not fine after the user finish.    
System.out.println("please enter the enough amount to pay");
Machine ob= new Machine();
Scanner re=new Scanner(System.in);
add_wallet =re.nextFloat();
wallet_amount=add_wallet;
  if(wallet_amount>=Total_cost)
{
bal_amt=wallet_amount-Total_cost;
System.out.println("Take your balance amount\n"+bal_amt+"₹");
System.out.print("Take your drinks\n");
System.out.println("-----HAVE A NICE DAY------- ");
}
  else if (wallet_amount<Total_cost)
  {
  System.out.println("Wallet amount s not enough to pay \n");
  ob.re_enter();
 
 
 
  }

  
else {
System.out.print("Take your drinks\n");
System.out.println("-----HAVE A NICE DAY------- ");
}

}
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.print("hello 😎 , sir/madam i am your helper.\n\n");
System.out.println("Look at the menu list before your purchase");                                        
    //First we will display what  the cooldrinks are available.

while(option==1) {
System.out.print("1.Coca cola\n");
System.out.print("2.pepsi\n");
System.out.print("3.Fanta\n");
System.out.print("4.Maaza\n");
System.out.print("5.7up\n");
System.out.print("6.Frooti\n");
System.out.print("7.Maa\n");
System.out.print("8.Mountain due\n");
System.out.print("9.Bovanta\n");
System.out.print("10.Lechar soda\n");
System.out.print("11.Water\n\n");
System.out.println(" Select the suitable  number. which one you want\t ");                           

  //Then we use the Scanner class to let the user select which cool drink they want  to select ?

Scanner sc=new Scanner(System.in);
choice=sc.nextInt();
 
if(choice==1)                                                                                                                

{
System.out.println("Coca cola");                                                       


System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");                                
         //I have programmed only two values of cool drinks as default.
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==2)
                                    

{
System.out.println("Pepsi");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==3)


{
System.out.println("Fanta");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}
}
else if(choice==4)

{
System.out.println("Maaza");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==5)
{
System.out.println("7up");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==6)
{
System.out.println("Frooti");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==7)
{
System.out.println("maa");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==8)
{
System.out.println("Mountain due");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}
else if(choice==9)
{
System.out.println("Bovanta");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}

else if(choice==10)
{
System.out.println("Lechar soda");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else {
System.out.println("OPTION NOT AVAILABLE ");
}

}


else if(choice==11)
{
System.out.println("Water");
System.out.println("Select the cost variant");
System.out.print("Choice 1. 40₹\t Choice 2. 60₹\t ");
choice=sc.nextInt();
if(choice==1)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=40*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price %.2f\t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}
}
else if(choice==2)
{
System.out.println("How many piece want to buy ");
qty=sc.nextInt();
if(qty<=4) {
pur_cost=60*qty;
Total_cost=Total_cost+pur_cost;
System.out.println("purchase price \t"+pur_cost+"₹");
}
else 
{
System.out.println("No of quantity overload");
}

}
else {
System.out.println("OPTION NOT AVAILABLE ");
}
}
else {
System.out.println("OPTION NOT IN THE MENU");

}

System.out.println("if you want to continue your purchase :\nPress 1 to continue\nPress 2 to exit ");  

       //Every time the user completes their purchase we ask the user whether they want to restart or not.
option=sc.nextInt();                   


}
{
}
System.out.println("TOTAL AMOUNT WANT TO PAY  :\t"+Total_cost); 
   
                                              //Here we display the total amount of the cool drinks purchased .if the user wants enough their purchase.

System.out.println("Enter your wallet amount :");
Machine ob=new Machine();

Scanner lk=new Scanner(System.in);                                                                                              

  //we ask here to pay the money.
wallet_amount=lk.nextFloat();
if (wallet_amount<Total_cost)                                                                                                     
        //if the amount paid is less than to total.The program will have a method called re_enter() to display the payment form again
{
System.out.println("Wallet amount is not enough to pay \n");
ob.re_enter();
}
else if(wallet_amount>Total_cost)                                                                                                 

        //if the amount paid is higher than total.we deduct the amount paid from the total amount and give the balance to the user .
{
bal_amt=wallet_amount-Total_cost;
System.out.println("Take your balance amount\n"+bal_amt+"₹");
System.out.print("Take your drinks\n");
System.out.println("-----HAVE A NICE DAY------- ");
}
else {                                                                                                                   
                   //if the payment amount is correct to the total.Take your drinks and Have a nice day is displayed.
System.out.print("Take your drinks\n");
System.out.println("-----HAVE A NICE DAY------- ");
}

}
}
___________________________________________________________________________________
OUTPUT

payment is less than total

hello 😎 , sir/madam i am your helper.


Look at the menu list before your purchase

1.Coca cola

2.pepsi

3.Fanta

4.Maaza

5.7up

6.Frooti

7.Maa

8.Mountain due

9.Bovanta

10.Lechar soda

11.Water


Select the suitable number. which one you want


1

Coca cola

Select the cost variant

Choice 1. 40₹ Choice 2. 60₹

1

How many piece want to buy

2

purchase price : 80.0₹

if you want to continue your purchase :

Press 1 to continue

Press 2 to exit

2

TOTAL AMOUNT WANT TO PAY : 80.0

Enter your wallet amount :

50

Wallet amount is not enough to pay


please enter the amount enough to pay

80

Take your drinks

-----HAVE A NICE DAY-------



PAYMENT IS FINE


hello 😎 , sir/madam i am your helper.


Look at the menu list before your purchase

1.Coca cola

2.pepsi

3.Fanta

4.Maaza

5.7up

6.Frooti

7.Maa

8.Mountain due

9.Bovanta

10.Lechar soda

11.Water


Select the sutiable number. which one you want

3

Fanta

Select the cost varient

Choice 1. 40₹ Choice 2. 60₹

2

How many piece want to buy

3

purchase price  :180.0₹

if you want to continue your purchase :

Press 1 to continue

Press 2 to exit

2

TOTAL AMOUNT WANT TO PAY : 180.0

Enter your wallet amount :

180

Take your drinks

-----HAVE A NICE DAY-------


PAYMENT IS HIGHER THAN TOTAL


hello 😎 , sir/madam i am your helper.


Look at the menu list before your purchase

1.Coca cola

2.pepsi

3.Fanta

4.Maaza

5.7up

6.Frooti

7.Maa

8.Mountain due

9.Bovanta

10.Lechar soda

11.Water


Select the suitable number. which one you want


5

7up

Select the cost variant

Choice 1. 40₹ Choice 2. 60₹1

How many piece want to buy

3

purchase price : 120.0₹

if you want to continue your purchase :

Press 1 to continue

Press 2 to exit

2

TOTAL AMOUNT WANT TO PAY : 120.0

Enter your wallet amount :

200

Take your balance amount

80.0₹

Take your drinks

-----HAVE A NICE DAY-------



Sunday, December 24, 2023

ONLINE TEXSHO SITE PROGRAM FOR TEXTILE

TEXSHO ONLINE  DRESS PURCHASING SITE PROCESS PROGRAMED BY C.

Abstract:

                   This program is designed to make it easy for the user to buy dresses from the textile. the program is designed so that the user can select what they want to purchase,and the program is designed so that the user can choose the brand ,Size and the quantity of clothes they buy   this program is designed using looping to start the program again if the user wants to buy again after the purchasing Just like how a clothing store or any online shopping application gives some discount if the user buys above a certain amount,We have designed some offers into this program.Since we don't use data base in this program,we use the variable inside the program to see the price of all dress .
                       
                                         

SOURCE CODE :

#include<stdio.h>

void main()
{
int sec_op,brnd_op,size_op,siz_op,n_o_s,n_o_p,choice=1,n_o_d;
float c_o_b_d,c_o_p_s=1200,c_o42_p_s=1400,c_o4_p_s=1300,c_o4_as_s=1300,c_o_as_s=1100,c_o42_as_s=1200,t_amt,total_cost=0,c_o_1d_p=880,c_o_2d_s=990,c_o_jp32_s=800,c_o_jp34_s=900, c_o_jp40_s=990,c_o_lp32_s=400 ,c_o_lp34_s=450,   c_o_lp40_s=600,             c_o_3d_s=1100,c_o_ad1_s=990,c_o_ad2_s=999,c_o_ad3_s=1250,c_o_cp32_s=770,c_o_cp34_s=880,c_o_cp40_s=990;
       
 // First  we enter the prices for all the items,because every time the user buys that item ,we will give the price by default.
       // Remember that the variable name must be unique.



system("color 0A");
  
printf("~~~~~~~   AK textile  ~~~~~~~~\n");
while (choice<2){

printf("\tSEC - 1 [SHIRTS]\n");
printf("\tSEC - 2 [DHOTHIS]\n");
printf("\tSEC - 3 [PANTS]\n");

printf("ENTER THE SECTION : ");
scanf("%d",&sec_op);                                              //here we take a user input what dress the user                                                                                                is going to buy.
    if (sec_op==1)
{
printf("\t                    1.otto\t,2.allen solly\n");
printf("SELECT THE BRAND :");
scanf("%d",&brnd_op);                            //here we will take a user input what brand the user                                                                                      wants to buy that dress. 
if(brnd_op==1)
{
printf("\t                  BRAND OttO\n");
printf("\t     SELECT THE AVALABLE SIZE '38','40','42'\t :");              //Let us default here to three sizes as the size in the available.
scanf("%d",&siz_op);
if(siz_op==38)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o_p_s*n_o_s;
total_cost=total_cost+c_o_b_d;                                      

//total_cost=total_cost+c_o_b_d;  
(Here we use it  total_cost add up the price of the dress each time the user buys and when the user wants enough this calculation its used to display the total price.

printf("\purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==40)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o4_p_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\t purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==42)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o42_p_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\t purchase cost :%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");
}
}
else if(brnd_op==2)
{
printf("\t                          Allen Solly\n");
printf("\t     SELECT THE AVALABLE SIZE '38','40','42'\t :");
scanf("%d",&siz_op);
if(siz_op==38)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o_as_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",total_cost);
}
else if(siz_op==40)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o4_as_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",c_o_b_d);
}
else if(siz_op==42)
{
printf("NO:OF:SHIRTS: ");
scanf("%d",&n_o_s);
c_o_b_d=c_o42_as_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost:%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");        

                                                      //If   the  user  enters  anything other than its programmed things likes  brand ,dress and its sizes .they are not programmed so they are programmed to print on {SIZE NOT AVILABLE ,BRAND NOT AVILABLE ,SECTION NOT AVILABLE.}
}
}
else 
{
printf("BRAND UN AVAILABLE\n");
}
}
else if (sec_op==2)
{
printf("\t         1.RAMRAJ\t,2.ALAYA\n");
printf("SELECT THE BRAND :");
scanf("%d",&brnd_op);
if(brnd_op==1)
{
printf("\t                           Ramraj brand\n");
printf("\t     SELECT THE AVALABLE SIZE 1.(4*8) \t2.(4*16\t 3.(VELCRO DHOTHI 4*8) :");
scanf("%d",&siz_op);
if(siz_op==1)
{
printf("NO:OF:DHOTHIS: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_1d_p*n_o_d;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==2)
{
printf("NO:OF:DHOTHIS: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_2d_s*n_o_d;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==3)
{
printf("NO:OF:DHOTHIS: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_3d_s*n_o_s;
total_cost=total_cost+c_o_b_d;
printf("\t purchase cost :%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");
}
}
else if(brnd_op==2)
{
printf("\t                           Alaya\n");
printf("\t     SELECT THE AVALABLE SIZE 1.'4*8',2.'4*16',3.'VELCRO DHOTHI 4*8'\t :");
scanf("%d",&siz_op);
if(siz_op==1)
{
printf("NO:OF:DHOTHIS: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_ad1_s*n_o_d;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",total_cost);
}
else if(siz_op==2)
{
printf("NO:OF:DHOTHIS: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_ad2_s*n_o_d;
total_cost=total_cost+c_o_b_d;
printf("\t price cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",c_o_b_d);
}
else if(siz_op==3)
{
printf("NO:OF:DHOTHI: ");
scanf("%d",&n_o_d);
c_o_b_d=c_o_ad3_s*n_o_d;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost :%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");
}
}
else 
{
printf("BRAND UN AVAILABLE\n");
}
}
if (sec_op==3)
{
printf("\t         1.COTTON\t,2.JEANS 3.LYCRA\n");
printf("SELECT THE MATERIAL :");
scanf("%d",&brnd_op);
if(brnd_op==1)
{
printf("\t                        COTTON   \n");
printf("\t     SELECT THE AVALABLE SIZE '32','34','40'\t :");
scanf("%d",&siz_op);
if(siz_op==32)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_cp32_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==34)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_cp34_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}
else if(siz_op==40)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_cp34_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");
}
}
else if(brnd_op==2)
{
printf("\t                           JEANS \n");
printf("\t     SELECT THE AVALABLE SIZE '32','34','40'\t :");
scanf("%d",&siz_op);
if(siz_op==32)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_jp32_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",total_cost);
}
else if(siz_op==34)
{
printf("NO:OF:pants: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_jp34_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost :%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",c_o_b_d);
}
else if(siz_op==40)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_jp40_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost  :%.2f\n",c_o_b_d);
}
else{
printf("SIZE UN AVAILABLE\n");
}
}

else if(brnd_op==3)
{
printf("\t                           LYCRA \n");
printf("\t     SELECT THE AVALABLE SIZE '32','34','40'\t :");
scanf("%d",&siz_op);
if(siz_op==32)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_lp32_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",total_cost);
}
else if(siz_op==34)
{
printf("NO:OF:pants: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_lp34_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\tprice cost:%.2f\n",c_o_b_d);
// printf("\t\t TOTAL COST :%.2f\n",c_o_b_d);
}
else if(siz_op==40)
{
printf("NO:OF:PANTS: ");
scanf("%d",&n_o_p);
c_o_b_d=c_o_lp40_s*n_o_p;
total_cost=total_cost+c_o_b_d;
printf("\purchase cost :%.2f\n",c_o_b_d);
}


else 
{
printf("BRAND UN AVAILABLE\n");
}
}
else{
printf("SECTION NOT AVAILABLE");
}

}
printf(" \n---------- --  ---- - YOU WANT TO CONTINUE THE PURCHAE   - ---- -- ------------\n");
printf("YES =1\t NO =2\n\n ");
scanf("%d",&choice);


}
//printf(" Total amount :%.2f\n",total_cost);
if(total_cost>=10000) 
{                                                                  
         //Total cost of clothes purchased by the user  was above 10000 rupees .the programm i designed to offer a discount of 8percentage from the total cost .like a festival offer. 

t_amt=(total_cost*8)/100;
printf(" Total amount :%.2f\n",total_cost);
total_cost=total_cost-t_amt;
printf("THE DISCOUNT  AMOUNT IS :%.2f\n",t_amt);
printf("----------------------------------\n");
printf(" TOTAL AMOUNT :%.2f\n",total_cost);
printf("-----------------------------------\n");
               printf("     \n   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>     THANK YOU     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ");

}
else
{                                                                                             
     //If the total cost of the purchased dress is less than 10 thousand rupees,the program will print total cost only without any discount.

printf("----------------------------------\n");

printf(" TOTAL AMOUNT\t :%.2f\n",total_cost);
printf("-----------------------------------\n");
printf(" \t\t >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   THANK  YOU     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  ");
}

}

In this output i will run only some of contents  .Any one want to check or need any understanding just copy the whole code and run it on any ide .is there any error was aries please comment me for alter it.💡
______________________________________________________________________________________________________________________________________________________________________

OUTPUT

WITHOUT DISCOUNT
~~~~~~~   AK textile  ~~~~~~~~
        SEC - 1 [SHIRTS]
        SEC - 2 [DHOTHIS]
        SEC - 3 [PANTS]
ENTER THE SECTION : 1
                            1.otto      ,2.allen solly
SELECT THE BRAND :1
                          BRAND OttO
             SELECT THE AVALABLE SIZE '38','40','42'     :38
NO:OF:SHIRTS: 2
        purchase cost :2400.00

---------- --  ---- - YOU WANT TO CONTINUE THE PURCHAE   - ---- -- ------------
YES =1   NO =2

 1
        SEC - 1 [SHIRTS]
        SEC - 2 [DHOTHIS]
        SEC - 3 [PANTS]
ENTER THE SECTION : 2
                 1.RAMRAJ       ,2.ALAYA
SELECT THE BRAND :2
                                   Alaya
             SELECT THE AVALABLE SIZE 1.'4*8',2.'4*16',3.'VELCRO DHOTHI 4*8'     :1
NO:OF:DHOTHIS: 2
        price cost:1980.00

---------- --  ---- - YOU WANT TO CONTINUE THE PURCHAE   - ---- -- ------------
YES =1   NO =2

 2
----------------------------------------
 TOTAL AMOUNT    :4380.00
----------------------------------------
                 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   THANK  YOU     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

___________________________________________________________________________________
 WITH DISCOUNT


~~~~~~~   AK textile  ~~~~~~~~
        SEC - 1 [SHIRTS]
        SEC - 2 [DHOTHIS]
        SEC - 3 [PANTS]
ENTER THE SECTION : 1
                            1.otto      ,2.allen solly
SELECT THE BRAND :2
                                  Allen Solly
             SELECT THE AVALABLE SIZE '38','40','42'     :38
NO:OF:SHIRTS: 10
        purchase cost:11000.00

---------- --  ---- - YOU WANT TO CONTINUE THE PURCHAE   - ---- -- ------------
YES =1   NO =2

 1
        SEC - 1 [SHIRTS]
        SEC - 2 [DHOTHIS]
        SEC - 3 [PANTS]
ENTER THE SECTION : 2
                 1.RAMRAJ       ,2.ALAYA
SELECT THE BRAND :1
                                   Ramraj brand
             SELECT THE AVALABLE SIZE 1.(4*8)   2.(4*16  3.(VELCRO DHOTHI 4*8) :1
NO:OF:DHOTHIS: 20
        Purchase cost :17600.00

---------- --  ---- - YOU WANT TO CONTINUE THE PURCHAE   - ---- -- ------------
YES =1   NO =2

 2
 Total amount :28600.00
THE DISCOUNT  AMOUNT IS :2288.00
--------------------------------------
 TOTAL AMOUNT :26312.00
--------------------------------------
                -------------------------------THANK YOU-----------------------------------------

DDL command in sql

DATA DEFINITION LANGUAGE DBMS language database language are used to read,update and store data in a database.There are several suc...