Unit Test 11B - Unit 11 Readiness Test Version B 1. Write a...

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

View Full Document Right Arrow Icon
1. Write a simple java application that will run on your computer as a stand alone application. The program should print out greeting: "Wow, this is my first java program!" class TrivialApplication { public static void main ( String args[] ) { System.out.println("Wow, this is my first java program!"); } } 2. This question has two parts: 1) Following is the code for a class Bookstore. Declare an object named mybookstore. Create the object. Print out its details. Next, operate on mybookstore such that it has a name “Book People” (or what you want to write) and phone number "xxx-xxx-xxxx" (or whatever number you want to use). Print out the details of mybookstore again. class TrivialApplication { public static void main(String args[]) { Bookstore myBookstore; myBookstore = new Bookstore(); myBookstore.showData(); myBookstore.setName("Book People"); myBookstore.setPhoneNumber("512-370-2473"); myBookstore.showData(); } } class Bookstore { String Name; String phoneNumber;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Unit Test 11B - Unit 11 Readiness Test Version B 1. Write a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online