Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
3.37K subscribers
1.13K photos
3 videos
17 files
373 links
Main channel https://t.me/Coding_000
Contact Admin 👉 @ILOVEU_143 for booking your exam slots
Web- https://coding000.github.io/Projects/
💯% clearance in any placement exams
OffCampus -https://t.me/Offcampus_000
Discussion- https://t.me/exams_discussion
Download Telegram
Share our channel screenshot in large groups

For coding answers & Sql 🏃🏃🏃🏃
👍2
import java.util.Scanner;

public class BankOperations implements IBankAccountOperation {
    private int initialBalance = 0;

    public static void main(String[] args) {
        BankOperations bankOperations = new BankOperations();
        bankOperations.showBalance();
        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter the amount to deposit: ");
        int depositAmount = scanner.nextInt();
        bankOperations.depositFunds(depositAmount);

        System.out.print("Enter the amount to withdraw: ");
        int withdrawAmount = scanner.nextInt();
        bankOperations.withdrawFunds(withdrawAmount);

        scanner.close();
    }

    @Override
    public void showBalance() {
        System.out.println("Your current balance is: " + initialBalance);
    }

    @Override
    public void depositFunds(int amount) {
        initialBalance += amount;
        System.out.println("You have deposited " + amount + ". Your current balance is: " + initialBalance);
    }

    @Override
    public void withdrawFunds(int amount) {
        if (amount > initialBalance) {
            System.out.println("Insufficient balance. Withdrawal canceled.");
        } else {
            initialBalance -= amount;
            System.out.println("You have withdrawn " + amount + ". Your current balance is: " + initialBalance);
        }
    }
}
1👍1🔥1
Share our channel screenshot in large groups

For coding answers &  Sql 🏃🏃🏃🏃
👍2
Give reactions guys..and share our channel...to get more solutions...❤️😁
2🔥1
public List<GroceryItem> calculateInvoice(List<GroceryItem> purchasedItems, Map<String, Double> prices, Map<String, Double> discounts) {
    List<GroceryItem> invoiceItems = new ArrayList<>();

    for (GroceryItem purchasedItem : purchasedItems) {
        String itemName = purchasedItem.getItemName();
        int quantity = purchasedItem.getQuantity();

        // Calculate the total price for the item, including the discount.
        double price = prices.get(itemName);
        double discount = discounts.getOrDefault(itemName, 0.0);
        double totalPrice = price * quantity - discount * quantity;

        // Create a new GroceryItem object for the invoice.
        GroceryItem invoiceItem = new GroceryItem(itemName, quantity, price, totalPrice);
        invoiceItems.add(invoiceItem);
    }

    // Sort the invoice items in ascending order by product name.
    invoiceItems.sort(Comparator.comparing(GroceryItem::getItemName));

    return invoiceItems;
}
👍2🔥1
Share our channel screenshot in large groups

For coding answers &  Sql 🏃🏃🏃🏃
👍2
SELECT c.title AS category_title, p.title, SUM(p.stock_number) AS total_stock
FROM categories c
JOIN products p ON c.id = p.category_id
GROUP BY c.title, p.title
HAVING SUM(p.stock_number) > 10
ORDER BY category_title ASC, p.title ASC, total_stock


E commerce website

Share @coding_000
👍3
SELECT
    A.email AS "email account",
    COUNT(O.account_id) AS "outputs",
    SUM(LENGTH(O.output) - LENGTH(REPLACE(O.output, ' ', '')) + 1) AS "total words",
    ROUND(SUM(LENGTH(O.output) - LENGTH(REPLACE(O.output, ' ', '')) + 1) / COUNT(O.account_id), 2) AS "avg words per output"
FROM accounts A
LEFT JOIN results O ON A.id = O.account_id
GROUP BY A.email
ORDER BY A.email ASC;
👍2
SELECT
  categories.title AS category,
  products.title,
  products.stock_number AS total_stock
FROM
  products
INNER JOIN categories ON products.category_id = categories.id
WHERE
  products.stock_number > 10
ORDER BY
  category ASC,
  products.title ASC,
  total_stock DESC;
🔥31
Share our channel screenshot in large groups

For coding answers &  Sql 🏃🏃🏃🏃
👍7
SELECT
   DATE_FORMAT(date_field, '%Y-%m') AS month_year,
   'Jobs' AS source,
   COUNT(*) AS total_number
FROM
   jobs
GROUP BY
   month_year
UNION ALL
SELECT
   DATE_FORMAT(date_field, '%Y-%m') AS month_year,
   'Freelancers' AS source,
   COUNT(*) AS total_number
FROM
   freelancers
GROUP BY
   month_year
ORDER BY
   month_year ASC,
   source ASC;

Freelancer code @coding_000❤️
👍6