Java

Search for question

Questions & Answers

R3.12 What is the this reference? Why would you use it? R3.13 Which of the methods in the CashRegister class of How To 3.1 are accessor methods? Which are mutator methods? R4.8 What are the values of the following expressions? In each line, assume that double x = 2.5; double y = -1.5; int m= 18; int n = 4; a. x + n *y- (x + n) * y b.m/n + m % n c. 5* x n / 5 d. 1 (1 (1-(1- (1 n)))) e. Math.sqrt(Math.sqrt(n)) R4.12 Find at least five compile-time errors in the following program. public class HasErrors { } public static void main(); { } System.out.print (Please enter two numbers:) x = in. readDouble; y = in.readDouble; System.out.printline("The sum is + x + y); ■ R5.5 What do these code fragments print? R6.6 What do these loops print?


1- Abstract Provide a paragraph (or two short ones) that briefly explains the problem, the solution, and your conclusion. Abstract is the essence of the whole report with no detail information. 2- Introduction Focus on Problem Definition: - Clearly state the problem you are addressing. Provide some details about the nature of the problem (e.g., such as which country you are using, what colors, ...) You could name different algorithms that could be used for the specific problem you are working on. You could also mention their pros/cons of this problem. 3- Experimental Setup Explain the Methodology/algorithm: a. Briefly explain how you formulate the problem and your solution b. Include the pseudo-code of the algorithm Explain Input/Output interfacing c. How a user should interact with the system? d. What are given, assumed, expected.


1. Write a program (in java or any other language) to access and manage the contents of database tables. Follow the following steps to set your computer for the assignment and accomplish the goal. a. Download the University database from the class textbook website and load it to your local MySQL database server. https://www.db-book.com/university-lab-dir/sample_tables-dir/DDL.sql b. Load the simple data set. https://www.db-book.com/university-lab-dir/sample_tables-dir/smallRelations/ smallRelations InsertFile.sql c. Download the database driver (mysql-connector.java for java language) set it up with your system https://dev.mysql.com/downloads/connector/i/ select flatform independent zip file d. Create a Java program to display the content of any table in the database. When the table name is given, it should display the content of the table. i. Program should ask the table name to display when selecting the display data option from the main menu. Then display the content of the selected table. e. Add the functionality to insert record to the instructor table. i. User should be able to select the option to insert data from the main menu ii. User should be asked to enter each column data one after the other and once the final column data is inserted, it should insert the data to the department table. f. Add a main menu item to select set of classes of a given instructor i. Program should ask the instructor id to display the classes of the instructor. ii. The program should list the classes that the given instructor teaches in the current semester. Instructor may have previous records of teaching in previous semester, we do not need to display them. g. Add a main menu item to add a class to an existing instructor i. User should be able to insert the instructor id to who you need to assign a class ii. The user is presented to enter the class information. You must insert the information in corresponding relation/s.


Write a program that asks a user to guess a secret number between 1 and N, where N is a positive number that the user is prompted for. The program should also prompt the user for the maximum number of guesses they would like to make. Each time the player makes a guess, the program shall respond with "correct", "too low", or "too high". The program should keep track of the number of guesses the user made to discover the secret number. The program should continue execution until the user has discovered the secret number or has exceeded the maximum number of guesses. The program shall also allow the user to play the game again until the user declines. The program should generate the magic number randomly, using the built-in Java method Math.random(). To generate a random number between 1 and N, the following formula may be used: randomNumber = (int) ( N * Math.random() ) + 1 Submit the source code for each program, and a screen capture of each program's output, in a zip file named as follows: Assignment3, followed by an underscore (), followed by your first name initial, followed by your last name. For example, if your name is Jane Smith your zip file would be Assignment3_jsmith.zip. Please be sure to comment your source code.


LAB this first program will help in indentifying phishing scams. 1. Create a list of 30 words, phrases and company names commonly found in phishing messages. Assign point value to each based on your estimate of its likelihood to be in a phishing message (e.g., one point if it's something likely, two points if modereratly, or three points if highly likely). 2. Write an application that scans a file of text for these terms and phrases. For each occurance of a keyword or phrase within the text file, add the assigned point value to the total points for the number of occurences and the point total. Show the point total for the entire message. 3. Write a word file answering these questions: Does your program assign a high point total to some actual phishing e-mails you have received? Does it assign a high point total to some legitimate e-mails you have received? Need java program to complete this work


Given below is a UML representation of kid's judo club software design with all classes, their relations, and multiplicities.


Write a program that prompts the user to enter the maximum number of asterisks (*) to display on a line of output, as well as a choice of two different output patterns. The program shall then display the asterisks according to one of the patterns below. For example, if the user specifies 10 as the maximum number of asterisks, the output should look like one of the following:


Consider the following instance of the Travelling Salesman Problem: Highlighted in bold is the following route of length62: A → C → B → E → D → A Using the 2-opt algorithm, which of the following modifications are valid swaps that can be made to the above route to obtain a shorter route? Remove (A, C'), (B, E)and Add(А, В), (С, Е)- Remove (A, D), (C, B)and Add(С, D), (A, B). Remove (A, C'), (A, D)and add(C, D), (A, A). Remove (A, D), (B,E)and add(А, E), (В, D). Remove (A, D), (B, E)and add(А, В), (D, E).


No Question Found forJava

we will make sure available to you as soon as possible.