Questions
Need urgently, please do it as soon as possible i have only 40 min for this...

Need urgently, please do it as soon as possible i have only 40 min for this task ( Doing in Java).

Question no 1: Solve completely.

a) Define the following concepts with proper syntax, where required. Also, write why we use these concepts (for last three bullets).

 Execution process of java program

 Copy constructor

 Instance and class variable

 Access specifiers

b) Write a program to print the area of a rectangle by creating a class named 'Area' having two methods. First method named as 'setDim' takes length and breadth of rectangle as parameters and the second method named as 'getArea' returns the area of the rectangle. Length and breadth of rectangle are passed through constructor.

In: Computer Science

Consider the cell described below at 251 K: Pb | Pb2+ (1.47 M) || Fe3+ (2.11...

Consider the cell described below at 251 K:

Pb | Pb2+ (1.47 M) || Fe3+ (2.11 M) | Fe

Given the standard reduction potentials found on the sheet attached to the exam, calculate the cell potential after the reaction has operated long enough for the [Fe3+] to have changed by 1.078 M

In: Chemistry

Display nonduplicate names in ascending order) Given one or more text files, each representing a day’s...

Display nonduplicate names in ascending order) Given one or more text files, each representing a day’s attendance in a course and containing the names of the students who attended the course on that particular day, write a program that displays, in ascending order, the names of those students who have attended at least one day of the course. The text file(s) is/are passed as command-line argument(s). USe language java, ide netbeans

In: Computer Science

The use of assistive technology has had a huge impact on disabled individuals. Please discuss the...

The use of assistive technology has had a huge impact on disabled individuals. Please discuss the benefits, as well as some potential issues, in the application of assistive technologies with this population. Include your operational definition of assistive technology in your response.

Thank you.

In: Psychology

What are two sources of bias during an observation period

What are two sources of bias during an observation period

In: Psychology

3. How is the purchasing and receiving function supposed to work for the Food and Beverage...

3. How is the purchasing and receiving function supposed to work for the Food and Beverage category – i.e., how is it designed to operate? What steps are different from the other categories? Again, a process flow map is helpful along with a specific example of something they might buy (i.e., salmon from Alaska or oranges from CA). Be sure to include the relationship with Safeway and how that works.

In: Operations Management

Find a 13-bit burst error polynomial that cannot be detected by the CRC-8 check. The burst...

Find a 13-bit burst error polynomial that cannot be detected by the CRC-8 check. The burst error polynomial must have the form E(x) = x^12 + … + 1, and the terms x^k for k = 1, 2, …, 11 can have a coefficient of either 0 or 1. Here is a 13-bit burst error polynomial that can be detected: x^12 + x^8 + x^2 + x + 1. The CRC-8 generator polynomial is x^8 + x^2 + x + 1. (By a 13-bit burst error we mean that there has been a burst of energy that causes noise on the communication channel during the span of 13 bits. For example, the energy may drive the voltage to a high value for all 13 bits. Some of those bits might have been 1’s (and represented by the high voltage), so the energy does not cause those bits to be in error. So, assume the first and thirteenth bits are incorrect, and the bits in between those two end points may or may not be in error.)

In: Computer Science

Discuss the Ardipithecus ramidus fossil and its implications for understanding human evolution in 300 words

Discuss the Ardipithecus ramidus fossil and its implications for understanding human evolution in 300 words

In: Biology

1. You are the director of operations of a large airport. Discuss the above statement showing...

1. You are the director of operations of a large airport. Discuss the above statement showing how far it is reflected in your day to day work. 2. The Information Super-highway is widely used in modern airports. Discuss how the Information Super-highway is useful in the following domains: a) Communication b) Security

In: Computer Science

We want to develop a sales system for a mobile shop. The system should keep information...

We want to develop a sales system for a mobile shop. The system should keep information about the mobile phones available at the shop. the system should allow the user the ADD new mobile phones, one at a time, along with their features. The system should also allow to search mobile phones , update their information, and delete them (one by one). Try to provide different criteria for search. When the system starts, it should load the information about the mobile phones forma file. if the file doesn't exist, the system should create the file. The system should provide a (console based) menu to interact with it. The system not use any arrays and all the changes should be reflected in the file.

Language: C++

In: Computer Science

Describe the three main types of referential actions (cascade, restrict, set null). How do you use...

Describe the three main types of referential actions (cascade, restrict, set null). How do you use these in your work?

In: Computer Science

I have a problem with the code for my project. I need the two clients to...

I have a problem with the code for my project. I need the two clients to be able to receive the messages but the code I have done only the server receives the messages. I need the clients to be able to communicate with each other directly not throught the server.

The requirements of this "local chat" program must meet are:

1. The chat is performed between 2 clients and a server.

2. The server will first start up and choose a port number. Then the server prints out its IP address and port number.

3. The client then will start up and create a socket based on the information provided by the server.

4. Now the client and the server can chat with each other by sending messages over the network.

5. The client/server MUST be able to communicate with each other in a continuous manner. (e.g. One side can send multiple messages without any replies from the other side)

6. There is no requirement on what language you use to implement this project, but your program should call upon the socket API for UDP to realize the functionality.

7. You should demonstrate your project using two machines (one for the client and one for the server. Pick your virtual machine as the client to communicate with your actual machine, which is server in our project).

8. You need to open at least 2 cmd window in your virtual machine to demonstrate multiple machine communicate with your server machine (actual machine)

My Code

UDPServer.java

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UDPServer {
   public static void main(String args[]) throws Exception{
       int serverport=6789;
       int clientport=1234;
       byte[] receiveData = new byte[1024];
       byte[] sendData = new byte[1024];
       DatagramSocket serverSocket = new DatagramSocket(serverport);
       System.out.println("SERVER READY");
       while(true){
       DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
       serverSocket.receive(receivePacket);
       String msg = new String(receivePacket.getData()).trim();
       System.out.println("Message from CLIENT with ID:"+msg);
        InetAddress IPAddress = receivePacket.getAddress();
       int port = receivePacket.getPort();
       String returnMsg = "Thanks. Received your message!";
       sendData = returnMsg.getBytes();
       DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, IPAddress, port);
       serverSocket.send(sendPacket);
       }
   }
}

UDPClient.java

package socket;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UDPClient {
   public static void main(String args[]) throws Exception{
       int serverport=6789;
       int clientport=1234;
       byte[] sendData = new byte[1024];
       byte[] receiveData = new byte[1024];       
       BufferedReader inFromUser = new BufferedReader(   new InputStreamReader(System.in));
       String clientId;
       System.out.println("Enter your ID:");
       clientId = inFromUser.readLine();
       while(true) {
           System.out.println("Enter your message:");
           String sentence = inFromUser.readLine();
          
           DatagramSocket clientSocket = new DatagramSocket();
           InetAddress IPAddress = InetAddress.getByName("localhost");
           sendData = (clientId+":"+sentence).getBytes();
           DatagramPacket sendPacket =
                   new DatagramPacket(sendData, sendData.length, IPAddress, serverport);
           clientSocket.send(sendPacket);
           DatagramPacket receivePacket =
                   new DatagramPacket(receiveData, receiveData.length);
           clientSocket.receive(receivePacket);
           String receivedMsg = new String(receivePacket.getData()).trim();
           System.out.println("FROM SERVER:" + receivedMsg);
           clientSocket.close();
       }
   }
}

In: Computer Science

On January 1 2000 The Patriot Company purchased all of the stock of the Chief Company...

On January 1 2000 The Patriot Company purchased all of the stock of the Chief Company at book value
Patriot accounts for its investment in Chief using the initial value method and Chief does not pay dividends
On January 1, 2014 Patriot Company issued (sold) $500,000 8% semi-annual bonds for $530,000
These 20 year bonds pay interest on July 1 and January 1 of each year. Patriot uses straight-line amortization
On January 1, 2019 Chief Company purchased the Patriot bonds for $485000. Chief also uses straight-line
amortization
REQUIRED:
a) make Patriot's journal entry when they sell the bonds
b) make the entry Patriot makes when it makes its first interest payment on July 1, 2014
c) make the entry Chief makes when it purchases the bonds on January 1, 2019
d) make the entry Chief makes when it receives its first interst payment on July 1 2019
e) make the necessary worksheet entries needed in 2019
f) In 2019, Patriot reported income of $300,000 (unconsolidated) and Chief reported income
of $25,000. What is consolidated income?
g) make the necessary worksheet entries needed in 2020
h) in 2020, Patriot reported income of $300,000 (unconsolidated) and Chief reported income
of $25,000. What is consolidated income?

In: Accounting

i am writing a research paper on "How does elementary class room size affect organizational citizenship...

i am writing a research paper on "How does elementary class room size affect organizational citizenship behavor for teacher in a self contained class room setting and need to come up with a thesis?

In: Psychology

Considering Google Maps as a graph, list four possible weights that can be associated with edges...

Considering Google Maps as a graph, list four possible weights that can be associated with edges of the graph.

In: Computer Science