CodeLab 10.09.06 - CodeLab 10.09.06 Write a literal...

Info icon This 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;
Image of page 1

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

View Full Document Right 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.
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 ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern