Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Java package called exercises . Inside the exercises package, create another package (subpackage) called task1 Create a Java class called Task inside the

Create a Java package called exercises .

Inside the exercises package, create another package (subpackage) called task1

Create a Java class called Task inside the task1 package.

Insert a main() method inside the Task class.

Inside the main() method, insert this statement:

System.out.println("Task executed");

Compile and run the main() method of the Task class.

Inside the exercises package, create another package (subpackage) called task2

Inside the main() method create an array of DataTask.

Create 3 DataTask instances and assign a reference to them to element 10, 100 and 200 in the array.

Inside the main() method create a max and min variables of type int .

Loop through the array and find the largest and the smallest values of the DataTask instances and assign it to the max and min variables. Use static import of max() and min() methods of Math class.

Calculate area and circumference of circle. As radius of a circle use one of the values of the DataTask instances chosen by user. Use static import for PI of Math class.

Inside the exercises package, create another package (subpackage) called task3

Create a Java class called Teacher inside the task3 package and a sub classes MathTeacher, MusicTeacher, InformaticsTeacher. Declare teaches() method (returns information about subject) in the base class and position and collegeName properties and method in sub class. For each teacher output the information about the subject they teach, name of the college and position. For this purposes use static import of out.println() method.

it should array like: int[] dataTask = new int[]; add 10,100,200

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Summarize some human resource management training initiatives.

Answered: 1 week ago

Question

=+ a. How does this change affect the incentives for working?

Answered: 1 week ago