Question: In Java, we always specify the data type when we're declaring a variable. The syntax is: dataType variableName For this practice assignment, you get to

In Java, we always specify the data type when we're declaring a variable. The syntax is:
dataType variableName
For this practice assignment, you get to write a simple class named JavaVariables. Declare a main method in that class. In that main method, have it do the foll
Declare an int variable named nine09 and initialize it to your 909-number
Declare a string variable named subject and initialize it to "CPSC"
Declare an int variable named courseNumber and initialize it to 1302
Declare a char variable named courseSuffix and initialize it to "K'(notice that in Java, strings use two double quotes ("..."), whereas chars use two
Declare a boolean variable named isonline (but do not initialize when declaring it)
Declare a double variable named points (but do not initialize when declaring it)
Assign isonline to reflect if you are taking this course online or in-person (do this on a different line of code than the declaration)
Assign points to be 97.5(do this on a different line of code than the declaration)
Display the value stored in the nineeg variable on its own line For example, something like:
909123456?
Display the following output, using the variables above:
CPSC 1302K(online: true): 97.5 points
or
CPSC 1302K(online: false points
 In Java, we always specify the data type when we're declaring

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!