Question: //******************************************************************** // Complexity.java Author: Lewis/Loftus // // Represents the interface for an object that can be assigned an // explicit complexity. //******************************************************************** public interface Complexity
//********************************************************************
// Complexity.java Author: Lewis/Loftus
//
// Represents the interface for an object that can be assigned an
// explicit complexity.
//********************************************************************
public interface Complexity
{
public void setComplexity (int complexity);
public int getComplexity();
}


lest your mdifications. PP 7.5 Write a Java interface called Priority that includes two meth- ods: setPriority and getPriority. The interface should define a way to establish numeric priority among a set of objects Design and implement a class called Task that represents a task (such as on a to-do list) that implements the Priority interface. Create a driver class to exercise some Task objects. Modify the Task class from PP 7.5 so that it also implements the Complexity interface defined in this chapter. Modify the driver class to show these new features of Task objects. PP 7.6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
