This tutorial will teach you how to make a Cake Shop Inventory Management System in Java step by step. This system will helpful you to learn Inventory Management System.
int sum = 0; if(chkCho.isSelected()) { String cho = "Chocolate cake"; int price = 1000; int qty = Integer.parseInt(txtCqty.getText()); int tot = price * qty; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { cho, price, qty, tot } ); } if(chkRed.isSelected()) { String crispy = "Red velvet cake"; int price = 1200; int qty = Integer.parseInt(txtRqty.getText()); int tot = price * qty; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { crispy, price, qty, tot } ); } if(chkCup.isSelected()) { String hotdeal = "Cupcake"; int price = 500; int qty = Integer.parseInt(txtCupqty.getText()); int tot = price * qty; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { hotdeal, price, qty, tot } ); } for(int i=0; i<jTable1.getRowCount(); i++) { sum = sum + Integer.parseInt(jTable1.getValueAt(i, 3).toString()); } txtbill.setText(Integer.toString(sum));
Conditional statements in Python allow us to control the flow of execution based on conditions.…
A Java Bean is a reusable software component that follows a specific set of conventions.…
Java provides a rich set of built-in methods for handling String operations efficiently. Since strings…
Java remains one of the most in-demand programming languages worldwide, powering everything from enterprise applications…
Java provides multiple ways to convert an integer (int) to a string (String). Whether you're…
Java Server Pages (JSP) is a powerful technology used to develop dynamic web applications by…