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

Create a Java program to find which word has the maximum occurrence and
replace that word by a special symbol, say *.
Have you ever answered a test question that tells you to enumerate a series of things, but the answer must be in a sentence? Quite tiring to write those things separated by commas and a single space, isn't it?

Then let's try coding it instead!

Write a menu driven program in Java to perform the operations on an Integer

Queue by making use of the concept of interfaces. And create custom

exceptions to deal with the following situations

A non-integer value is encountered in the queue

b. Insert operation when the Queue if full

c. Remove operation when queue is empty.


RunVenu es Code the class Run Venues . The outline of the class is as follows: public class RunVenues { public static void main(String[] args) { //Add code 1 here //Add code } } 1 2 here Create an object of the type VenueControlClass . . 2 Call the menuControl() in the VenueControlClass class by using the object. 6 Applications Development Foundations I
Code a method, menuControl() that is void. This method controls the application. Processing includes: Call the menu() method. Use a switch statement and depending on the option returned by menu(), it calls the appropriate method(). Refer to the menu() for the available options.
Code a method problemlab(). This method has no parameters and is void. This method displays all computer labs that have less working computers that number of seats. Use the methods problemVenue() and show() coded in question 2. Expected output (take note of headings and other formatting): Problem computer labs Building name: Engineering Venue number: 1.35 Number of seats: 50 Number of working computers: 30 ------------------------- Building name: Engineering Venue number: 1.24 Number of seats: 40 Number of working computers: 35 -------------------------
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 venues -------------------- Building name: Engineering Venue number: 2.38 Number of seats: 80 ------------------------- Building name: Engineering Venue number: 1.1 Number of seats: 40 Number of working computers: 40 ------------------------- Building name: Engineering Venue number: 2.60 Number of seats: 60
Code a method named createComputerLab(). This method has no parameters, but return a ComputerLab object. Required: a. Define a Scanner variable to read from the keyboard. b. Define variables for building name, room number, number of seats and number of working computers. Prompt the user to type data values for each of the variables and read the values from the keyboard. c. Define and create a ComputerLab object from the data read from the keyboard. d. Return this ComputerLab object. 6 Code a method displayAllRooms(). This method has no parameters and is void. This method displays all objects in the array. Required: a) Display a heading.
Code a method menus() that returns an int value. This value represents the option the user has chosen from the available menu options. Required: a) Define a Scanner variable to read from the keyboard. b) Define an int value, named option. c) Display a menu in the following format: 1: Add room 2: Display rooms 3: Display problem labs 4: Exit d) Read the user’s option from the keyboard into the variable option. e) Return the option read from the keyboard. 4 Code a method named createVenue(). This method has no parameters, but returns a Venue object. Required: a) Define a Scanner variable to read from the keyboard. b) Define variables for building name, room number and number of seats. Prompt the user to type data values for each of the variables and and read the values from the keyboard. c) Define and create a Venue object from the data read from the keyboard. d) Return this Venue object.
VenueControlClass This class has a menu control method that allows users to add a Venue or ComputerLab object to an array. The array allows for 20 elements, but the array may contain less elements. The number of elements if the arrays is available in the variable numberOfVenues. Code the attributeas and methods as specified. 1 Code an array that can hold 20 Venue objects. 2 Code the numberOfVenues attribute. 3 Code a no-argument constructor. In this constructor, a) Add 3 Venue objects to the venues array. b) Add 3 ComputerLab objects to the venues array. c) Set numberOfVenues to 6.
LATEST TUTORIALS
APPROVED BY CLIENTS