ustsci.wordpress.com
July | 2007 | UST-ICS
https://ustsci.wordpress.com/2007/07
University of Santo Tomas – Institute of Computer Studies. Archive for July, 2007. Java – Activity 2. July 24, 2007. 8211; Instance of a class. While working with classes, we declare a reference variable of a. And then, typically, using the operator new. We instantiate an object of that. And store the address of the object into the reference variable. The statement: Sum j = new Sum();. Instantiate an object called j. Using the operator new. To create a class object is called instantiation of the class.
ustsci.wordpress.com
UST-ICS | University of Santo Tomas – Institute of Computer Studies | Page 2
https://ustsci.wordpress.com/page/2
University of Santo Tomas – Institute of Computer Studies. Java – Activity3. July 11, 2007. Reading a record from a source file and storing the results to an output file. 1 Type the program file. 2 Create a source file (score.txt) and provide a record, like:. Sandy Tan 90.5 82.4 70. 3 Compile the program. 4 Execute the program. 5 Open the output file (result.txt) and the result should look like this:. Student Name: Sandy Tan. Test Scores: 90.50 82.40 70.00. Import java.io.*;. Import java.util.*;. 8211; T...
ustsci.wordpress.com
August | 2007 | UST-ICS
https://ustsci.wordpress.com/2007/08
University of Santo Tomas – Institute of Computer Studies. Archive for August, 2007. Java – Hands on Exam. August 10, 2007. 1 The manager of a basketball stadium wants you to write a program that calculates the total amount for each type of ticket sales. After each game as well as the grand total ticket sales. Which will be stored in a file called “ sales.txt. There are four types of tickets. 8211; premium, upper box A, upper box B, and general admission. Premium is 250 pesos. Upper box A is 100 pesos.
ustsci.wordpress.com
September | 2007 | UST-ICS
https://ustsci.wordpress.com/2007/09
University of Santo Tomas – Institute of Computer Studies. Archive for September, 2007. Composition – Java. September 25, 2007. Private String firstName;. Private String lastName;. Private Date birthDate;. Private Date hireDate;. Constructor to initialize name, birth date, and hire date. Public Emp (String first, String last, Date dateOfBirth, Date dateOfHire). FirstName = first;. LastName = last;. BirthDate = dateOfBirth;. HireDate = dateOfHire;. Convert Emp to String format. Private int month;. If (tes...