Purchase Solution

Legal Java variable names and a Basic Program.

Not what you're looking for?

Ask Custom Question

This program calculates profits and sales prices for a furniture company.

-First calculate the profit, then calculate the sales price, then calculate the profit when the sale price used.

-Profit is defined as the retail price minus the wholesale price.

-The sales price 20% deducted from the retail price.

-The sales profit is defined as the sales price minus the wholesale price.

-Perform the appropriate calculations for the assignment statement.

Purchase this Solution

Solution Summary

The solution contains the complete program. The code is completely commented and follows all the guidelines for easier and faster understanding of the Java basics. Grab the solution and enjoy.

Solution Preview

Dear student,

First of all thank you for choosing me to help you in understanding more about Java. Please find the solution attached.

Thanks,
Kavita Narang

A.)
Legal Identifiers—
myIDNumber
yourIDNumber
this_is_a_year
number
floatNum
May13
Number
NUMBER // legal identifier can have all the characters in capital and is different from "Number" and "number"
$number // legal identifier can start with $ symbol

Illegal Identifiers ----
short
110number
One Number

B.) Declare and initialize constants to represent following values—
// constants in java are declared with ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.