Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

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.
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:

6. At the end of the assignment, you should submit a program that simply surveys a user and guesses their political party. The more advanced your program is, the faster and more accurately it will guess the user's political party affiliation.
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:

5. Overall, for this assignment you will prepare data storage files, obtain and store data through the usage of questions, and then write code using machine learning to create a survey that will accurately guess a user's political party before they complete the survey.
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:

4. Some answers to questions correspond with more than one political party. Find a way to make your program advanced enough so that it can weigh answers with differing levels of intensity depending on which parties they correspond best with.
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:

3. As you gain more data on each political party, you should have a way of storing this information to create a program that will use this data to accurately survey users and guess their political libations.
LATEST TUTORIALS
APPROVED BY CLIENTS