Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Perform the following operations on file using menu-driven application,

• Opening a existing file

• Creating a new file

• Renaming a file

• Deleting a file

• Creating a directory

• Finding the absolute path of a file

• Get the file names of a directory


Write a Java program to perform the following operations on file using menu-driven application,

• Opening a existing file

• Creating a new file

• Renaming a file

• Deleting a file

• Creating a directory

• Finding the absolute path of a file

• Get the file names of a directory

Java Class that returns the sum of two integers, write a JSP code that uses a page directives to call this Java Class


Create a subclass called TicketSales that extends the Tickets class. The TicketSales class must contain a constructor to accept the customer name, movie title, customer age and price of the movie as parameters. Write code for the print_tickets method which displays the customer name, movie title, movie price, discount and final cost due. A discount of 10% is applied if the customer’s age is greater than or equal to 65. If the customer is under 65 years old, no discount is given. Finally, write a Movie_Tickets class to instantiate the TicketSales class. Sample output is shown below and you may use the same values to test your application


Create a base class called "Animal" which has two (2) class fields. The first field holds an integer "IDtag" for a number that a zoo uses to catalogue their animals and the second field holds a string called "species."

From the Animal class, derive two (2) classes. One is called "Bird" and the other "Reptile". E.g. Species could be (for the Bird class) ostrich, dove, chicken etc. and (for the Reptile class) lizard, snake, bearded dragon etc.

The Bird class has an additional class field called "colour" which holds the colour of the birds. feathers * (int - 1 = gre) , 2-white, 3=black) . The reptile class has an additional class field called "bloodTemp" which hold the reptile's temperature of their blood (double).

You need to instantiate two (2) objects. The bird object will be called "brd" and the reptile object

called "rept."

Input values for the bird's IDtag, species and feather colour (int) and for the reptile's IDtag number, species and bloodTemp.

a)    Write a Java method, lastLargestIndex, that takes as parameters an int array and its size and returns the index of the last occurrence of the largest element in the array. Also, write a program to test your method.



java program to check whether a number is prime or not using 'regex '
Complete the class RunStudents. The outline of the class is as follows: public class RunStudents { public static void main(String[] args) { //add code for 1. //add code for 2. } } 1 Create an object of the type StudentLoans.. 2 Call the menuControl() in the StudentsLoan class by using the object defined in 1.
Code a method displayAllStudents(). This method has no parameters and is void. This method displays all the objects in the array. a) Display a heading . b) Loop through the array and use the show() of every object to display the object details. c) Print a line after each object is displayed. Example of expected output: Displaying all students -------------------- Student details Name: Smittie Student number: 12345 Loan amount: 10000.0 ------------------------- Student details Name: Jannie Student number: 67543
Code a method named createStudent(). This method has no parameters, but returns a Student object. a) Define a Scanner variable to read from the keyboard. b) Define variables for name, student number and loan amount. Prompt the user to type data values for each of the variables and then read the values from the keyboard. c) Define and create a Student object from the data read from the keyboard. d) Return this Student object. 4 Code a method named createPostGraduate(). This method has no parameters, but returns a PostGraduate object. a. Define a Scanner variable to read from the keyboard. b. Define variables for name, student number and loan amount and thesis. Prompt the user to type data values for each of the variables and then read the values from the keyboard. c. Define and create a PostGraduate object from the data read from the keyboard. d. Return this PostGraduate object.
LATEST TUTORIALS
APPROVED BY CLIENTS