Skip to content

Java Assignment: Billing Stock System #10

Open
@Pankaj-Str

Description

@Pankaj-Str

Java Assignment: Billing Stock System

Objective:
Create a Java program to manage a Billing Stock System that allows users to input product details, store them, and later search for product information using SKU (Stock Keeping Unit) number.

Requirements:

  1. Create a class Product with the following attributes:

    • SKU (Unique Number)
    • Product Name
    • Product Quantity
    • Single Product Price
  2. Implement the following functionalities:

    • Add multiple products.
    • Search for a product using SKU and display the product details.

Input Section:

  • Prompt the user to enter the SKU, Product Name, Product Quantity, and Single Product Price.
  • Allow the user to add multiple products.
  • After entering each product, ask the user if they want to add more products.

Output Section:

  • Allow the user to search for a product using the SKU number.
  • Display the total cost, product name, quantity, and single price of the searched product.

Sample Interaction:

--- Input Section ---
Enter SKU (Unique Number): 101
Enter Product Name: Books
Enter Product Quantity: 20
Enter Single Book Price: 120/-

Do you want to add more [Y/N]: Y
Enter SKU (Unique Number): 102
Enter Product Name: Toy
Enter Product Quantity: 5
Enter Single Book Price: 560/-

Do you want to add more [Y/N]: Y
Enter SKU (Unique Number): 103
Enter Product Name: Samosa
Enter Product Quantity: 250
Enter Single Book Price: 20/-

Do you want to add more [Y/N]: N

--- Output Section ---
------ Search Item ------
Enter Product Item Form SKU No .: 103
Total Cost: 5000/-
Product Name: Samosa
Quantity: 250
Single Price: 20/-

Guidelines:

  1. Create a Product class.
  2. Create methods to add products and search products by SKU.
  3. Use appropriate data structures to store and manage products.

Instructions:

  1. Implement the Product class with appropriate attributes and methods.
  2. Implement the BillingStockSystem class to manage product addition and searching.
  3. Use ArrayList to store the products.
  4. Test the program by running it and ensuring the sample interaction works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions