Skip to content

GKSAHU1000/CTSAssessment2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CTSAssessment2

Java8-Assessment2

Part 1: eCart Basics with Stream API

  1. Product Creation and Initialization:

• Create a Product class with attributes like id, name, price, and rating.

• Initialize a list of products. Use Stream.of() to add products to the list

//Basic Setup Step 1: Create a Product class and make a attributes id, name, price, and rating

Step 2: create a one DataClass Here add some list like ProductList add initialize the cart list;

Step 3. create a ProductController class here add a all Operation what we need

P1Q1. • Initialize a list of products. Use Stream.of() to add products to the list

Step 1. Create a One P1Q1 Class and add main method

step 2. in controller class add a method getProductListUsingStreamOf and using Stream.of() add some product and print;

P1Q2. . Filtering Products:

  • Use the filter() method to list products below a certain price.

step 1. create getProductsBelowPrice method in a controller class and here add some filter with predicate like if product. is below certain price. step 2. use a P1Q2 class call getProductsBelowPrice and pass the price and print the all value with this list.

About

Java8-Assessment2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages