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

A point on the two-dimensional plane can be represented by two numbers: a X coordinate and a Y coordinate.

reate a simple text-based console game that implements at least three (3) interfaces


Create method:

Method name: maxIndex

Method parameters: An integer array named arr

Method return: An integer value

Method description: This method will find the index of the array arr with the maximum value.

For example, if arr ={1.0, 2.0, 5.5, 1.5}, then it returns 2 since the maximum is 5.5 and it is present in index 2. In case, there are two same values, it returns the index of the last same value.


Java


Can u pls explain to me the details of this program? how did it come up to this, the uses of each part


import java.util.Scanner;


public class Activity3 {


public static void main(String[] args) {

System.out.println(two(5,3));

  }


  public static int one(int x, int y) {

    return x > y ? x + y : x - y * 2;

  }


  public static double two(int x, double a) {

    Scanner in = new Scanner(System.in);

    int first = one(6, 8);

    double z = in.nextDouble();

    z += a;

    first += x;

    return z > first * 2 ? z : 2 * first - z;

  }

}


We want to calculate the total marks of each student of a class in Physics, Chemistry and Mathematics and the average marks of the class. The number of students in the class are entered by the user. Create a class named Marks with data members for roll number, name and marks. Create three other classes inheriting the Marks class, namely Physics, Chemistry and Mathematics, which are used to define marks in individual subject of each student. Roll number of each student will be generated automatically.

You are a system administrator with broad access to enterprise systems. Your supervisor has asked you to begin archiving all of the emails and web activity logs of one of your co-workers.Typically requests of this nature are initiated through a formal communication from your campus’s legal office. You feel that this request is inappropriate and possibly at odds with standard campus procedure and processes.You raise your concerns with your supervisor, but are told that this is a sensitive matter, and details cannot be shared with you. After thinking more about the conversation, you had with your supervisor, you are under the impression that you might lose your job if you persist in discussing the matter further or if you refuse to carry out the task. What would you do? In your answer, refer to ethical codes and what IT


professionals need to commit to and mention a few general or common principles included in ethical codes.

You probably have encountered Triangle pattern problems before when you started learning programming. Let’s see how well you do with numbers this time. Try to look at the examples closely and think of an algorithm that replicates the outputs. Go for it!



Input



A single line containing an integer n.



9


Output



The output generated based on the inputted integer n.



1


23


456


789



Or


Input


4




Output


1


23


4




Or input


12



Output


1


23


456


78910


1112

Solution in java ONLY plz... FULL question can be found on the following link http://ntci.on.ca/compsci/java/ch6/6_10.htmll ---> question 7

I cannot put full question here as its too long... so full question is on the link

The requirement is for it to NOT be done with import java.io.*; etc..... just directly

Thanks, appreciate it

----------------------------------------------------------------------------------

Write a class Lock that could be used to create electronic lock objects. Each lock may be in either an open (unlocked) or a closed (locked) state and each one is protected by its own integer key which must be used to unlock it. The class should contain the following methods.


Using WHILE LOOP statement

Write a Program that will ask the user to accept an

integer input and outputs message below:


Print Numbers Descending (from 1000)


Enter the number that you want to print:

Number of iterations:


The taxi has a base fee of P40.00 for the first 250 meters. An additional P2.50 is added for every succeeding 200 meters. Compute and print the total fare that you would need to pay


LATEST TUTORIALS
APPROVED BY CLIENTS