Create a program and explain the followi int x = 9; double y = 5.3; result = calculateValue(x, y);
Q: Need help in writing a program consisting between 300-500 lines of code. Program is a java…
A: Java code is given below
Q: Answer to each question should be a executable java code, tested and run You implement each…
A: public class Acceleration{ public static void main(String[] args) { //variables to store input…
Q: Give an algorithm for the following problem. Given a list of n distinct positive integers, partition…
A: Input Array: The program takes an input array of positive integers nums.Sorting: The input array is…
Q: 2. Temp conversion This program, prompts the user to enter either an 'F' for Fahrenheit or 'C' for…
A: Java is a high-level programming language promoted by Sun Microsystems. Alternatively, Java programs…
Q: đồ án árray-based implementation à queue Create a class ArrayQueue • default constructor • isEmpty()…
A: import java.text.DecimalFormat;import java.text.NumberFormat;import java.util.Random; class…
Q: (Occurrences of each letter) Write a program that prompts the user to enter a file name and displays…
A: import java.io.Console;import java.util.Arrays;import java.util.HashMap;import java.util.List;import…
Q: Write a Java code and initialize the following variables: title, last name, first name, student…
A: Java code to Initialize the following variables: title, last name, first name, student number, age,…
Q: Write Java code for a program that asks and displays the name and age of the user. Make sure you…
A: Your Java program is given below as you required with an output.
Q: 2. Print the first 10 negative integers in the output in Swift programming language. Display the…
A: Here I have created a for loop. In the for loop, I have generated negative numbers from -1 to -10.…
Q: Add the following method to the Point class: public double distance(Point other) Returns the…
A: Solution: Programming language used: Java Program code for distance method - (Note: all…
Q: (Stopwatch) Design a class named StopWatch. The class contains: 1 Private data fields startTime and…
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Q: (The Account class) Design a class named Account that contains: 1 A private int data field named id…
A: public class Main{ public static void main(String[] args) { Account a=new Account(1,1000);…
Q: Exercise 2 – Sum of Sequential Integers Write a program that asks the user for N and then sum all…
A: 1. Declare the variables- N, sumFormula, and sumLoop and initialize the variable- sumLoop with 0 1.…
Q: (Maximum consecutive increasingly ordered substring) Write a program that prompts the user to enter…
A: Approach: Create 2 list - max = to store the maximum consecutive increasingly ordered substring…
Q: 1. For each call of the method below, display the value that is returned public int retval (int a,…
A: In case of option d, if we pass x to a and y to b and if x takes 20, then y should take all the…
Q: Please make a Huffman program code that will allow the user to do the following: Input a series of…
A: Description: A java program that does the following is described in the next sections: Input a…
Q: Exercise 4 – Repeatedly Echo a Word Write a program that asks the user to enter a word. The program…
A: 1. Declare the variables- inputString and times 2. Take in input from the user in the variable-…
Q: Question: - IN JAVA CODE and please follow ALL directions provided to write a COMPLETE program Write…
A: The question asks to create a Java program that manages a community center offering various programs…
Q: Create a java program with a Class FindArray that will try to iterate in the array displaying the…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Java program for file processing.
A: Here's a Java program for file processing based on the given requirements: import java.util.*;import…
Q: Create a complete Java program that shall allow the user to accept three integer values representing…
A: The question asks to allow user input via Start, End, Step. Now, keep adding steps until the end…
Q: 5. Assume each of the following has the same name, which of the following methods are overloaded…
A: Step 1:- Method Overloading is also known as Function overloading which means the method has…
Q: Create a complete Java program that shall allow the user to accept three integer values representing…
A: Introduction: Create a complete Java program that shall allow the user to accept three integer…
Q: Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramid Height, that…
A: In this question we have to write a Java code for the given problem statement, we have to just…
Q: Create an application to record student courses and grades. The application should also print a…
A: The code has given below:
Q: Implement textbook (9/E) problem 7.28 in page 303. The problem statement is reproduced next: 7.28…
A: Java is a high-level, class-based, object-oriented programming language that is widely used for…
Q: Write a JavaScript program to convert degrees centigrade into degrees Fahrenheit, and to write the…
A: Given:
Q: Create a collection of ArrayList with a size of 100 String elements.
A: a )Creation of collection of Array List public class JExample{ public static void main(String…
Q: with a java programme Last month Joe purchased some stock in Acme Software, Inc. Here are the…
A: Details of purchase: The number of shares that Joe purchased was 1,000. When Joe purchased the…
Q: Create a java program that takes in two strings as arguments- the source and destination filenames,…
A: The scanner is a java API class that is used to read data from either the keyboard or from the file.…
Q: Create a Java electronic voting program.
A: Code: import java.io.*; import java.util.Scanner; //Declare a class EvoteClass having 4 members as…
Q: 1. Write a program which consists of a single class called Calculator. This program will display a…
A: Java program for calculator
Q: Name:- MIT Note:- Please type this java code and also need an output for this given Java program.…
A:
Please type and execute this java
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Problem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…2) What does this code output? int fun(int x, int y) { if (x == 0) return 1; x = x/ 2; y = y - 1; return fun(x, y) + x + y; int main() { int a = 10; %3D int b = 10; %3! int c = fun(a, b); printf("%i\n", c); %3D return 0; 11 15 23 39int sum = int i = 0; while (i < 4) {sum = sum + i; %3D %3D { '++! System.out.print(sum); What is the value of sum? a. 6 Ob. 10 C. 15 Od. 21
- Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…int test(int *x, int y){ x=&y; return(*x+y); } int main(void) { int x=1, y=6; test(&y, x); printf("%d %d %d", x, test (&y,x),y); return 0; } 1 2 6lif the following code, what will be the variable "value" equal to when y=2 is being executed: def foo(value) : value = value + 2 def main(): x = 1 foo(x) y = 2 Variable "value" does not exist when y=2 is being executed. 02
- use visual basic Depreciation to a Salvage Value of 0 . For tax purposes an item may be depreciated over a period of several years, n . With the straight-line method of depreciation , each year the item dpreciates by 1/nth of it original value. with the double-declining-balance method of depreciation, each year the item depreciate by 2/nths of its value at the beginning of that year.(In the final year it is depreciated by its value at the beginning of the year. ) Write a program that performs the following tasks:(a) Request a description of the item, the year of purchase, the cost of the item, the number of years to be depreciated (estimated life), and the method of depreciation. The method of depreciation should be chosen by clicking on one of two buttons.(b) Display a year- by-year description of the depreciation. See Fig. 6.15 .def area(side1, side2): return side1 * side2s1 = 12s2 = 6 Identify the statements that correctly call the area function. Select ALL that apply. Question options: A print(f'The area is {area(s1,s2)}') B answer = area(s1,s2) C result = area(side1,side2) D area(s1,s2)Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsDistance. The calculation is:Distance = SquareRootOf( (x2 - x1)2 + (y2 - y1)2 ) #include <stdio.h>#include <math.h> int main(void) { double x1; double y1; double x2; double y2; double xDist; double yDist; double pointsDistance; xDist = 0.0; yDist = 0.0; pointsDistance = 0.0; scanf("%lf", &x1); scanf("%lf", &y1); scanf("%lf", &x2); scanf("%lf", &y2); /* Your solution goes here */ printf("%lf\n", pointsDistance); return 0;
- Problem statement:Write a loan calculator program that computesboth monthly and total payments for a given loanamount, annual interest rate, and loan period.TASK " Write a program that grades students' exam. The exam has 20 multiple choice questions. Here are the correct answers: 1- A 6- B 11-C 16- D 2- A 7- B 12- C 17- D 3- А 8- В 13-С 18- D 4- А 9- В 14- С 19- D 5- A 10-B 15- C 20- D "A student must correctly answer 15 of the 20 questions to pass the exam. " Write a class named StudentExam that holds the correct answers to the exam in an array. TASK (CONT.) " The class should also have an array that holds the student's answers. The class also should have the following methods: I passed. Returns true if the student passed the exam, or false if the student failed " totalCorrect. Returns the total number of correctly answered questions I totallncorrect. Returns the total number of incorrectly answered questions " questionsMissed. An int array containing the question numbers of the questions that the student missed. 1 On another class, ask the student to enter his name, take his answers and display the results returned from the StudentExam…“As one variable goes up, the other variable goes down” is a description of: