Skip to content

Latest commit

 

History

History
164 lines (91 loc) · 1.85 KB

pseudocode.md

File metadata and controls

164 lines (91 loc) · 1.85 KB

**#Pseudo code for Seller

  1. Product Specifications(description of product)

if(seller wants to edit product description) { seller can add product description }

elif { seller can edit product description }

else { seller can delete product description }

  1. Discounted items

Add a discount to the item

if(item selling more) { Discount = 25% }

elif(item selling on average) { Discount = 50%

else { Discount = 75% }

3)Feedback

if(customer bought the item) { He can write the feedback }

else { Just read the feedback }

  1. Category tag(Electronics, clothing etc)

if(seller wants to add images ) { click on add images }

else { delete the images }

  1. Click on logo --> Return to home screen

  2. Image doesn't display --> show the alt

  3. Click on hyperlink --> Redirect to another page

  4. Click on search bar --> Provide suggestions

  5. Carousel --> inside division class --> img - 1,2,3,4,5

  6. Add images to product

// Creating the object

const x = {name: "mobile", price: "£50", rating: 4, color: "blue"};

x.name; //prints the name of the mobile x.price; //prints the price of the mobile x.rating; //prints the rating of the mobile x.color; //prints the color of the mobile

function functionname(name, price, rating, color){

writing a function to use the arguments in the function in different ways

}

  1. list of seller products in the website

const x = [ "mobile", "Television", Washing Machine" ];

for (let i = 0; i < x.length; i++) {

print x[i]; //prints all the seller products

}

**#Pseudo code for Buyer

1)Out of stock

If(product is out of stock) { Show "OUT OF STOCK" }

else { "AVAILABLE" }

2)Buying a product

if(customer wants to buy a product now) { Clicks "BUY NOW" }

else { Clicks "ADD TO CART" }

3)Item selection if (customer clicks on image){ show detailed description of item }

else { just pop up the image }