Sunday, June 26, 2011

How to write a chessboard in JAVA?

import javax.swing.*;
import java.awt.*;

public class ChessBoard {

JFrame frame;
JPanel squares[][] = new JPanel[8][8];

public ChessBoard() {
frame = new JFrame("Chess Board");
frame.setSize(500, 500);
frame.setLayout(new GridLayout(8, 8));

for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
squares[i][j] = new JPanel();

if ((i + j) % 2 == 0) {
squares[i][j].setBackground(Color.black);
} else {
squares[i][j].setBackground(Color.white);
}
frame.add(squares[i][j]);
}
}



frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}

public static void main(String[] args) {
new ChessBoard();
}
}

Tuesday, February 17, 2009

ACCA Dec Exam 's Result published

Finally, the result for my three papers from F1 till F3 have been announced on 16.2.2009(Monday). I am glad that I passed all papers in part 1. I get the highest marks in Accountant in Business(F1), which emphasize more on management,economic and internal control of an organisation. Apart from that, I get an average score for Management Accounting(F2). This paper will served as a base for F9. Moreover, I get
a border line marks for Financial Accounting(F3). Anyway, I am lucky to pass F3 and I would do more revisions on F3 especially topics on partnership,direct and indirect cash flow and sales taxes.

Monday, October 27, 2008

Opening Inventory,Cost,Profit

Opening inventory overstate -> Cost overstate -> Profit understate

Opening inventory understate -> Cost understate -> Profit overstate

Saturday, October 25, 2008

Formulas for Basic Budgeting:
Pg 277
Budgeted production = Forecast sales + Closing inventory - Opening inventory

Pg 278
Material usage budget = budgeted production X quantity required per product

Material purchases budget = Material usage budget + Closing inventory - Opening inventory

Pg 281
Labour budgets = number of hours X labour rate per hour

Thursday, October 16, 2008

Relationship of Closing Inventory,Cost and Profit

Closing Inventory Overstate -> Cost Understate -> Profit Overstate

Closing Inventory Understate -> Cost Overstate -> Profit Understate