TaskDriver - Task task4 = new Task"Sleep"...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // TaskDriver.java Author: Lewis/Loftus // // Solution to Programming Project 5.3 // //******************************************************************** / public class TaskDriver { public static void main(String args[]) { Task task1 = new Task("Write another Java program"); task1.setPriority(7); Task task2 = new Task("Eat"); task2.setPriority(Priority.MIN_PRIORITY); Task task3 = new Task("Attend class"); task3.setPriority(Priority.MAX_PRIORITY);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Task task4 = new Task("Sleep"); task4.setPriority(4); System.out.println(" TO-DO\n------------"); System.out.println(task1.getName() + " \tpriority: " + task1.getPriority()); System.out.println(task2.getName() + " \tpriority: " + task2.getPriority()); System.out.println(task3.getName() + " \tpriority: " + task3.getPriority()); System.out.println(task4.getName() + " \tpriority: " + task4.getPriority()); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online