Ch5_Problem_Set.rtf

5 Pages
221 Views
Unlock Document

Department
Computer Science
Course
CMPSC 121
Professor
N/ A
Semester
Fall

Description
IST 297DIntroduction to Application ProgrammingChapter 2 Problem SetName 1The MegaBus reservation system has a variable to store the number of available seats on a bus Which data type is most appropriate to store this value Declare and initialize an example of this variable called availableSeats 1 pointVariable Declarations by an integer Example int availableSeats152The MegaBus reservation system has a variable to store the price of a seat on the bus Which data type is most appropriate to store this value Declare and initialize an example of this variable called priceOfSeat 1 pointFloating Point Numbers Example double PriceOfSeat30253What type of statement is an instruction to replace the existing value of a variable with another value 1 pointAssignment Statement4Systemout is an object of the class Printstream 1 point5Write a Java statement to declare and initialize a constant for the number of kilometers in a mile 1 pointfinal double NumberMileKilometers160934Kilometers in one mile6Write a Java statement to count the number of characters in the string greeting below 1 pointString greetingHello World int ngreetinglengthHello World 13
More Less

Related notes for CMPSC 121

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit