Java & C++ Examples - CardLayout.java / This...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CardLayout.java // This program displays a customer's personal information in a business card public class CardLayout { public static void main(String[] args) { int count; // count is a counter for printing "*" 50 times // Printing spaces in the top System.out.println("\n\n\n\n\n "); System.out.print("\t"); // Printing first line of the design for ( count=1 ; count<50; ++count) System.out.print("*"); // Printing the information System.out.println(" "); System.out.println("\t*\t\t\t\t\t\t*"); // using "\t" for printing 7 spaces System.out.println("\t*\t\t\t\t\t\t*"); System.out.println("\t*\t\t================\t\t*"); System.out.println("\t*\t\tBhfjhfkfkjkgkjkj\t\t*"); System.out.println("\t*\t\t================\t\t*"); System.out.println("\t*\t Home Tel. 03-435345435\t\t*"); System.out.println("\t*\t Work Tel. 03-454354455\t\t*"); System.out.println("\t*\t\t\t\t\t\t*"); System.out.println("\t*\t\t\t\t\t\t*"); System.out.println("\t*\t\t\t\t\t\t*"); System.out.println("\t*\t\t\t\t\t\t*"); System.out.println("\t* jkdfhjkdfhjkdfkjdfkgkdjf\t\t\t*"); System.out.println("\t* Wangsa Maju, Section 10\t\t\t*"); System.out.println("\t* 53300 Kuala Lumpur\t\t\t\t*"); System.out.println("\t*\t\t\t\t\t\t*"); System.out.print("\t"); for (count=1 ; count<50; ++count) System.out.print("*"); System.out.println("\n\n\n\n\n "); } }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Question 1 The constant percentage method of computing depreciation of an asset is based on the assumption that the depreciation charge at the end of each year is a fixed percentage of the book value of the asset at the beginning of the year. This assumption leads to the following relationship: ( 29 n d C S - = 1 whereC = original cost of asset d = depreciation rate per year
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Java &amp;amp; C++ Examples - CardLayout.java / This...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online