CodeLab 10.09.06

CodeLab 10.09.06 - CodeLab: 10.09.06 Write a literal...

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

View Full Document Right Arrow Icon
CodeLab : 10.09.06 Write a literal representing the integer value zero. More. .. 0 Write a literal representing the long integer value twelve billion. 12000000000L Declare an integer constant, MONTHS_IN_YEAR, whose value is 12. public static final int MONTHS_IN_YEAR = 12; Declare a constant MONTHS_IN_DECADE, whose value is the value of the constant MONTHS_IN_YEAR (already declared) multiplied by 10. public final int MONTHS_IN_DECADE = MONTHS_IN_YEAR * 10; Declare a short variable named patientsAge. public short patientsAge; Declare a long integer variable named grossNationalProduct. public long grossNationalProduct; Declare and initialize the following variables: monthOfYear, initialized to the value 11 companyRevenue, initialized to the value 5666777 firstClassTicketPrice, initialized to the value 6000 totalPopulation, initialized to the value 1222333 public short monthOfYear = 11; public int companyRevenue = 5666777; public short firstClassTicketPrice = 6000; public int totalPopulation = 1222333;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Write an expression that computes the sum of two variables verbalScore and mathScore (already declared and assigned values). More. .. verbalScore + mathScore Given the variables taxablePurchases and taxFreePurchases (already declared and assigned values), write an expression corresponding to the total amount purchased. taxablePurchases + taxFreePurchases Write an expression that computes the difference of the variables endingTime and startingTime. endingTime – startingTime Given the variables fullAdmissionPrice and discountAmount (already declared and assigned values), write an expression corresponding to the price of a discount admission. fullAdmissionPrice – discountAmount
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

CodeLab 10.09.06 - CodeLab: 10.09.06 Write a literal...

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