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

The Need for Security 

Why is coding vital for security? Provide instances where HIPPA, National Security, Bank/Heath industries must have stringent coding practices. Explain why. If possible, provide a small piece of code (Java or Python snippet) that illustrates this. 

Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.




BOLD words indicates a variable.



Sample Output:



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




Hi my name is Ryan Christian Nono.



I am 25 Years Old.



I love reading books and watching movies.



My favorite color is `Black` because the sky is white.




I love Programming 2 because of my Instructor.

Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.




BOLD words indicates a variable.



Sample Output:



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




Hi my name is Ryan Christian Nono.



I am 25 Years Old.



I love reading books and watching movies.



My favorite color is `Black` because the sky is white.




I love Programming 2 because of my Instructor.



Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.




BOLD words indicates a variable.



Sample Output:



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




Hi my name is Ryan Christian Nono.



I am 25 Years Old.



I love reading books and watching movies.



My favorite color is `Black` because the sky is white.




I love Programming 2 because of my Instructor.

Create a function that takes the number of wins, draws and losses and calculates the number of points a football team has obtained so far.



In this programming exercise, you will create a Car class definition and a CarTester client program.

The car must have the following properties: make, model, year, price, and two other properties of your own choosing. You must decide what variable type each of these properties should be declared as.

The car object must have at least three constructors. One constructor must be the default constructor. Another constructor must take all six properties and assign them. The third will be one of your own choosing. Any properties not sent to the constructor should be randomly assigned or given a default value.

In addition to the constructors, the car object should have a toString() method.

The CarTester program should ask the user to create three different cars, each using a different constructor. The program should display the information for each car once entered.


import java.util.Scanner;


public class Main {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

System.out.println("Enter a String");

String line = in.nextLine();

while (true) {

int space = line.indexOf(' ');

String word = line.substring(0, space == -1 ? line.length() : space);

System.out.println(word + " " + word.length() + " " + (word.length() > 1 ? word.substring(word.length() - 1)

+ word.substring(1, word.length() - 1) + word.substring(0, 1) : word));

line = line.substring(space + 1);

if (space == -1) {

break;

}

}

}

}

Do the coding so that output will remain same but ternary operator will not be used.


Write a program to take a String as input then display the words in one column, its length in another column, replace the first with last character of each word in third column.

Enter a String

a is the first vowel

a 1 a

is 2 si

the 3 eht

first 5 tirsf

vowel 5 lowev

Hint: Use length(), indexOf(), substring() if required.

Array & split & ternary(? :) are not to be used


Write the Java code required to solve the following problem. A complete program is

required and must follow all programming conventions (indenting, variable names,

comments, etc...).

You are to create a program which will place 8 queens on a chess board.

1 - Create a blank chessboard (8x 8 2D array of integers, all O's)

2 - Using a loop, ask the user for 8 locations on the board, replace the O with a 1 at

this location.

3 - Display the final board.

You do not need to include any error checking or checking for duplicate locations.


Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.



BOLD words indicates a variable.


Sample Output:


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



Hi my name is Ryan Christian Nono.


I am 25 Years Old.


I love reading books and watching movies.


My favorite color is `Black` because the sky is white.



I love Programming 2 because of my Instructor.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS