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

NOTE:

This question has been answered by someone else before but was not complete so kindly this time answer this in full and also when you write classes do send the code as well with the answer.

You will be tasked to write this program in Java,

The goal is for the program to be able to guess the user's political party before they reach the end of the survey. This will require your program to gather a substantial amount of data before it can make accurate guesses. In particular:

1. You should begin by presenting the user with questions that contain answer options that dier based on their political beliefs.

Ex. What should the government do to help the poor?

A. Make it easier to apply for assistance. B. Put more money into schools.

C. Incentivize welfare.

D. Nothing.


Design a program using Java NetBeans (Console application). With the following enum class: public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Create a second class called enumDayMood with a void method call telDayMood (). This method contain a switch case as follows: switch (day) { case MONDAY: JOptionPane.showMessageDialog (frame, "Mondays are bad."); break; case FRIDAY: JOptionPane.showMessageDialog (frame, "Fridays are better."); break; case SATURDAY: case SUNDAY: JOptionPane.showMessageDialog (frame, "Weekends are best."); break; default: JOptionPane.showMessageDialog (frame, “Midweek days are so-so."); break; } Create a method that will ask the user to enter a day of a week and the program should tell the mood of the day. If the user enter a wrong value the program should exit with 0.


You will be tasked to write this program in either C++ or Java, whichever you feel more comfortable with.

The goal is for the program to be able to guess the user's political party before they reach the end of the survey. This will require your program to gather a substantial amount of data before it can make accurate guesses. In particular:

2. The last question should ask which political party they affiliate with. This way you will be able to gather and store data corresponding to the results you acquire. Create at least 4 political party storage.



Design a program using Java NetBeans (Console application). With the following enum class: public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Create a second class called enumDayMood with a void method call telDayMood (). This method contain a switch case as follows


You need to find which digit occurs most number of times across the four given input numbers.

input1, input2, input3 and input4 are the four given input numbers.

The program is expected to find and print the most frequent digit.

Example1 –

If input1=123, input2=234, input3=345, input4=673

We see that across these four numbers,

1, 5, 6 and 7 occur once,

2 and 4 occur twice, and

3 occurs four times.

Therefore, 3 is the most frequent digit and so the program must print 3

NOTE: If more than a digit occurs the same number of most times, then the smallest of those digits should be the result. Below example illustrates this.

Example2 –

If input1=123, input2=456, input3=345, input4=5043

We see that

0, 1, 2 and 6 occur once, and

3, 4 and 5 occur thrice.

As there are three digits (3, 4 and 5) that occur most number of times, the result will be the smallest (min) digit out of these three. Hence, the result should be 3

Create a class that includes a data member that holds a “serial number” for each object created from the class. That is, the first object created will be numbered 1, the second 2, and so on. To do this, you’ll need another data member that records a count of how many objects have been created so far. (This member should apply to the class as a whole; not to individual objects. What keyword specifies this?) Then, as each object is created, its constructor can examine this count member variable to determine the appropriate serial number for the new object. Add a member function that permits an object to report its own serial number. Then write a main() program that creates three objects and queries each one


You will need to complete the following objectives as a Java Application: 1. When the program starts the user needs to be asked if they want to make a new entry or to view a previous entry 2. If the user wants to make a new entry, the first question will be how many meters they travelled (this will then need to be converted into kilometers) 3. The second question will give the user 3 options to choose from, and each option will have a value. The options are as follows: a. Hatchback = 3 b. SUV = 3.5 c. Sports car = 4. When the user has selected an option that options value needs to be multiplied by the distance they travelled in kilometers 4. The third question will allow the user to enter a description, of where they travel to and why did they travel there. 5. All the information above needs to then be saved into a JSON file 6. If the user says he want to view a previous entry the JSON file needs to be loaded and displayed.


Employee

-name: String

+Employee() <<constructor>>

+Employee(String)<<constructor>>

+toString(): String

+setName(String): void

+getName(): String

+getSalary(): double

+getHours(): double

+getLeaveDays(): int

+leaveApplication(): void

+work(): void

 

Manager

+Manager()<<constructor>>

+Manager(String)<<constructor>>

+getLeaveDays(): int

+getSalary(): double

+leaveApplication(): void

+work(): void

 

Secretary

+Secretary()<<constructor>>

+Secretary(String)<<constructor>>

+getHours(): double

+work(): void

 

a. Add a minimum of 10 objects to the array. You may hard-code these object values. The objects must be a mixture of Employee, Manager and Secretary. b. Display all the objects on the screen. c. Calculate, and then display, the average salary of all employees. Extra Calculate and display the cost of the leave to the company for each employee.


Implement simple system using Socket Programming Sockets). your chat system includes two types of components i) A chat room and a) ii) The client b) System contains maximum 3 clients, each can enter or leave the system at any time and one can design GUI as given in Figure. c) server side. d) All messages are to be broadcasted to all clients connected to the chat room.
Implement simple system using Socket Programming Sockets). your chat system includes two types of components i) A chat room and a) ii) The client b) System contains maximum 3 clients, each can enter or leave the system at any time and one can design GUI as given in Figure. c) server side. d) All messages are to be broadcasted to all clients connected to the chat room.
LATEST TUTORIALS
APPROVED BY CLIENTS