lab4-3 - Lab 2-2 This calculates profits and sales prices...

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

View Full Document Right Arrow Icon
// Lab 2-2 // This calculates profits and sales prices for a furniture company. public class Furniture { public static void main(String args[]) { String itemName = "Sofa"; double retailPrice = 450.00; double wholesalePrice = 300.00; double salePrice; double profit; double saleProfit; // Write your assignment statements here. salePrice = retailPrice - .1 * retailPrice; profit = retailPrice - wholesalePrice; saleProfit = salePrice - wholesalePrice; System.out.println("Item Name: " + itemName); System.out.println("Retail Price: $" + retailPrice); System.out.println("Wholesale Price: $" + wholesalePrice); System.out.println("Profit: $" + profit); System.out.println("Sale Price: $" + salePrice); System.out.println("Sale Profit: $" + saleProfit);
Background image of page 1

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

View Full Document Right Arrow Icon
System.exit(0); System.exit(0); } } // Lab 4-3 // GuessNumber.java - This program allows a user to guess a number between 1 and 10. // Input: User guesses numbers until they get it right. // Output: Tells users if they are right or wrong.
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.

{[ snackBarMessage ]}

Page1 / 3

lab4-3 - Lab 2-2 This calculates profits and sales prices...

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