can you check for me why this java code is error
Q: Write a Java program that implements the class Scrabble by following the design given below:
A: Use if else conditions to check each character and add up the respective score to total
Q: Mention two usages of this keyword with code in java.
A: In Java, 'this' is a reference variable that refers to the current object of a class method or a…
Q: IS THERE AN IMPORT.JAVA."SOMETHING" for /= or /+ ++ that works for java besides math for math, like…
A: “No”, the statement import java.“SOMETHING” does not exist in Java.
Q: an variables be used in Java without initialization?
A: Given: Can variables be used in Java without initialization?
Q: write this code on java
A: Required:
Q: Write a Java program that exposes Java’s rule for operand evaluation order when one of the operands…
A: Given Answer:- Firstly,I am writing the code, that exposes java rule for operand evaluation order…
Q: How many ways can first and second place be awarded to 10 people in java?
A: Program plan: Prompt for variables n and r Iterate over the variable n and evaluate the…
Q: This is a java question give me the output with proper explanation max 5 lines explain it not more…
A: Initially b is false and tt is 42 First if is TRUE because tt is less than 50 is true and !b is…
Q: Java - How do I output the statement exactly as it shows? How can I get rid of the commas at the…
A:
Q: Can I get the java version of this exercis
A: Like python, we can use same strip and replace methods
Q: Justify the validity of the following identifiers in Java. State a reason for both valid and invalid…
A: Below are the answers with reason:
Q: How do I write a line of code in Java to find how many numbers are below and above average ?
A: ⦁ Create two variables in the main method and initialize them with zero.⦁ Iterate the all numbers…
Q: → javalabs java Star ** ***
A: public class Star{ public static void main(String[] args){ int line,star; for(line = 1; line <=…
Q: 2. Show that a static method can be called using the class name and a dot operator
A: class Tester{ public static void helloStatic1() { System.out.println("Hi this is a helloStatic1…
Q: Write the correct java code that checks if variable x is positive
A:
Q: How can we use Encapsulation in Java
A: Encapsulation is a process of wrapping all the methods and members as a single unit. This is also…
Q: Explain every word in the header of the main method in a Java program.
A: Given: Explain every word in the header of the main method in a Java program.
Q: Java Take three number of three digits and find which is greatest and reverse the greatest number
A: Given: Three numbers having three digits each. To find: Maximum of the three numbers and reverse of…
Q: Conditionals and Loops
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2:…
Q: How can I get the user to enter an input while using multiple classes in one java program? How would…
A: Multiple classes can be used in programming as per the need There are two use cases where multiple…
Q: In Java langauge, please show the output of the program. Thank you
A: As per the requirement program is developed. Note: All the three developed classes Author.java,…
Q: Swap two integer numbers without using third variable. In java please
A: Add up the two numbers and then subtract the other element to get the other number
Q: Please answer Number 4 and 5 as they are associated altogether 4. Explain Java variable scope in…
A: Java variables are named location that stores data in memory. Scope of a variable defines access…
Q: Can you make all this code loop itself 17 times in java?
A: Program Description: To make all this code loop itself 17 times in java For the code to loop 17…
Q: for this java program i am suppose to do the figure on the top left and put it in rows and columns…
A: Note: Modified Code highlighted in bold. Code: import java. awt.*; public class DrawingTest {…
Q: Program in java to print the number in the range in which upper limit is given that is 945 and you…
A: Requirements:- Program in java to print the number in the range in which the upper limit is given…
Q: Overriding static and private methods is allowed in Java. Consider the following statement.
A: Introduction: Method concealing is the term for the situation described here, and overriding is not…
Q: Intro to java. Please write with some tests cases. Actually I do not understand “the result may be…
A:
Q: Take a number and check if palindrome or not in java .
A: Requirements :- Take a number and check if palindrome or not in java . Approach :- Steps : - Take…
Q: Need dry run for the following code in java language This question is from the book absolute…
A: For this question, there is supposed to be 2 classes, Circle and Rectangle where there will be a…
Q: Write A Java Program To Demonstrate Autoboxing And Unboxing int And Short.
A: The above question is solved in step 2:- Auto boxing:- it refers to the conversion of old value into…
Q: I need a java code version the same question if possiable PLEASE!
A: The output has to display a menu of choices. Then the user can select which operation want to…
Q: Please help with the following: In Java give two example of Unit Test
A: The two example of unit test given below;
Q: ction feature in Java, a java pr
A: Is it correct to say that due to garbage collection feature in Java, a java program never goes out…
Q: I am getting a "Line not found" error in this Java program. Why? What does it mean and how do I…
A: I had code your problem but your student class was not available so i had cerated a demo student…
Q: For this code in java, I'm stuck on an error im getting on line 21 and when the code works it should…
A: It will cause error as there is no variable named PlayerName .
Q: In java langauge, please show the output of the program. thank you
A: import java.util.Scanner; public class Main{ //Function to return computer Choice public…
Q: Check which is larger 0.0 or minimum value of double and also verify this in java
A: Required:- Check which is larger 0.0 or minimum value of double and also verify this in java…
Q: Question 1: Write a complete Java program - with your own code writing - that contains: 1. A main…
A: I have provided solution for Q1 of Part1)----- I have provided JAVA CODE along with CODE…
Q: Write a JAVA code, to check whether a given number is positive number or negative number.
A: For Check the positive or negative number if number is greater then 0 that means number is positive…
Q: Write a java code to get the kinetic energy of rotation after taking angular momentum and angular…
A: Required:- Write a Java Code to get the kinetic energy of rotation after taking angular momentum and…
Q: HELP ME WITH THIS JAVA CODE
A: As You mentioned, THIS IS CODE FOR CAMERA ACTIVITY AND YOU HAVE ATTACHED XML AND MANIFEST , SO I AM…
Q: List out the errors in the following code java?
A: Given Java code snippet :- public class A{ private int a; public A(int a){ a=a;…
Q: Print the right pascal's triangle pattern in java
A: Question. Print the right pascal's triangle pattern in java Answer. JAVA code to print the right…
Q: Write a code in Java that results like test 2&3
A: Given: Write a code in Java that results like test 2&3
Q: This is a java question.
A: if the first operand is true, Java with short-circuit and not even look at the second operand. In…
Q: use Java Swing to make the following User Interface
A: Solution: Given,
can you check for me why this java code is error
Step by step
Solved in 4 steps with 2 images
- Exercise Arithmetic (Command-line arguments): Write a program called Arithmetic that takes three command-line arguments: two integers followed by an arithmetic operator (+, -, * or /). The program shall perform the corresponding operation on the two integers and print the result. For example: java Arithmetic 3 2 + 3+2=5 java Arithmetic 3 2 - 3-2=1 java Arithmetic 3 2 / 3/2=1 Hints: The method main(String[] args) takes an argument: "an array of String", which is often (but not necessary) named args. This parameter captures the command-line arguments supplied by the user when the program is invoked. For example, if a user invokes: java Arithmetic 12345 4567 + The three command-line arguments "12345", "4567" and "+" will be captured in a String array {"12345", "4567", "+"} and passed into the main() method as the argument args. That is, args is: {"12345", "4567", "+"} // args is a String array args.length is: 3 // length of the array args[0] is: "12345"…Language: JAVA Script Your company is giving every employee earning less than $50,000 a 10% raise! *Write a function 'employeeRaises(peopleObj)' that takes an array of objects s containing employee names and their salaries and returns an array containing the employees that need raises, along with their new salaries. Example: employees [ {name: "Alice", salary: 80000}, {name: "Bob", salary: 48000 }, {name: "Carol", salary: 60000}, {name: "Dan", salary: 78000}, {name: "Ellen", salary: 100000}, console.log(employeeRaises (employees) ); // [ { name: 'Bob', salary: 44000 } ] funcation emplyeeRaises(employees){ |// Your code here} /****DO NOT MODIFY ANYTHING UNDER THIS LINE****/ try{| module.exports = employeeRaises;}catch (e) {|module.exports=null;}JAVA CODE PLEASE 3. Term by CodeChum Admin Construct a class called Term. It is going to represent a term in polynomial expression. It has an integer coefficient and an exponent. In this case, there is only 1 independent variable that is 'x'. There should be two operations for the Term: public Term times(Term t) - multiplies the term with another term and returns the result public String toString() - prints the coefficient followed by "x^" and appended by the exponent. But with the following additional rules: if the coefficient is 1, then it is not printed. if the exponent is 1, then it is not printed ( the caret is not printed as well) if the exponent is 0, then only the coefficient is printed. Input The first line contains the coefficient and the exponent of the first term. The second line contains the coefficient and the exponent of the second term. 1·1 4·3 Output Display the resulting product for each of the test case. 4x^4
- Jordan University of Science and TechnologyCS415 Contemporary Programming TechniquesMidterm Exam – Second semester 2021Name: ID: Section:Important note: your code must compile correctly and run without errors.Otherwise your code will get the grade zero.Question 1: Implement a java class called ParsingCustomerRecords that has thefollowing data members and functions:ParsingCustomerRecods- customerRecords: array of strings- result: string variable- recordsNumber: int variable-fileName: string variable+ Constructor(String filename, int recordsNumber)+ void Reader()+ void Executor()+ void showResult()+ String toString()All of the data members are private, and all of the methods are public.Constructor has two parameters which are (1) the file name in which Customers’ recordsare stored, and (2) the number of the records in the file. The constructor functionality is toassign suitable initial values to the fileName and recordsNumber data members. Theconstructor also should instantiate the…JAVA PPROGRAM ASAP Please create this program ASAP BECAUSE IT IS MY LAB ASSIGNMENT #2 so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Chapter 9. PC #8. 8. Sum of Numbers in a String (page 610) Write a program that asks the user to enter a series of numbers separated by commas. Here are two examples of valid input: 7,9,10,2,18,6 8.777,10.9,11,2.2,-18,6 The program should calculate and display the sum of all the numbers. Input Validation 1. Make sure the string only contains numbers and commas (valid symbols are '0'-'9', '-', '.', and ','). 2. If the string is empty, a messages should be displayed, saying that the string is empty. Test Case 1 Enter a series of numbers separated only by commas or type QUIT to exit:\n7,9,10,2,18,6ENTERThe sum of those numbers is 52.00\nEnter a series of numbers separated only by commas or type QUIT to exit:\nENTEREmpty string.\nEnter a series of numbers separated only by…Java programming please type the code CountOccurrences(String[], String) This is a public static function that takes a String[] and a string for the parameters and returns an int. This function should count the number of times a given pattern (the second parameter) is found within each string in an array of strings (first parameter). Then the function should return the total number of occurrences. Arguments: String[] array - An array containing at least one string String pattern - A string containing at least one character. returns int - The number of times the pattern is found in the strings in the array. Example: array = ["aba", "ckel", "kealska"] pattern = "a" output = 4
- Thue–Morse weave. Write a program ThueMorse.java that takes an integer command-line argument n(Integer.parseInt(args[0])) and prints an n-by-n pattern like the ones below. Use arrays for this assignment. Include two space characters between each + and - character. example: input= 4 output = + - - + - + + - - + + - + - - +Code in c language, please. Thank you in advance. Assign listOfPizzas's first element's numberOfCalories with the value in listOfPizzas's second element's numberOfCalories. #include <stdio.h>#include <string.h> typedef struct Pizza_struct { char pizzaName[75]; int numberOfCalories;} Pizza; int main(void) { Pizza listOfPizzas[2]; scanf("%s", listOfPizzas[0].pizzaName); scanf("%d", &listOfPizzas[0].numberOfCalories); scanf("%s", listOfPizzas[1].pizzaName); scanf("%d", &listOfPizzas[1].numberOfCalories); /* Your code goes here */ printf("A %s slice contains %d calories.\n", listOfPizzas[0].pizzaName, listOfPizzas[0].numberOfCalories); printf("A %s slice contains %d calories.\n", listOfPizzas[1].pizzaName, listOfPizzas[1].numberOfCalories); return 0;}Write an application in C++ using simple code that uses a class called “Book” (seedetails below). The application must perform the following tasks. Create an array of “Book” objects (i.e., array must be able to store 2books). Create 2 “Book” objects initialized as follows.o title = “C++ Textbook”; Author = “Pete Parker”; Publisher =“Cengage”, ISBN = “0123456789”; subject = “Computer Programming”;o title = “Java Textbook”; Author = “Bruce Wayne”; Publisher = “McGrawHill”, ISBN = “9876543210”; subject = “Computer Programming”; Add the two books to the array.o Assume the two publishers have merged into a new company called“BookConglomerate”. Use a loop to create statements to modify thepublisher field with the new publisher name. Display the following information for both bookso Book Title (i.e., “C++ Textbook” or “Java Textbook”)o Authoro Publishero ISBNo SubjectThe Book class must contain the following. Constructor with parameters that initialize all instance variables title,…
- C++ Define an "Expression" class that manages expression info: operand1 (integer), operand2 (integer), and the expression operator (char). It must provide at least the following method:- toString() to return a string containing all the expression info such as 50 + 50 = 100 Write a command-driven program named "ListExpressions" that will accept the following commands:add, listall, listbyoperator, listsummary, exit "add" command will read the expression and save it away in the list "listall" command will display all the expressions "listbyoperator" command will read in the operator and display only expressions with that given operator "listsummary" command will display the total number of expressions, the number of expressions for each operator, the largest and smallest expression values "exit" command will exit the program Requirements:- It must be using the array of pointers (not vector) to Expression objects to manage the list of Expression…C++ Define an "Expression" class that manages expression info: operand1 (integer), operand2 (integer), and the expression operator (char). It must provide at least the following method:- toString() to return a string containing all the expression info such as 50 + 50 = 100 Write a command-driven program named "ListExpressions" that will accept the following commands:add, listall, listbyoperator, listsummary, exit. "add" command will read the expression and save it away in the list "listall" command will display all the expressions "listbyoperator" command will read in the operator and display only expressions with that given operator "listsummary" command will display the total number of expressions, the number of expressions for each operator, the largest and smallest expression values "exit" command will exit the program Define a "NamedExpression" class that manages named expression info: name (string), operand1 (integer), operand2 (integer),…C++ Define an "Expression" class that manages expression info: operand1 (integer), operand2 (integer), and the expression operator (char). It must provide at least the following method:- toString() to return a string containing all the expression info such as 50 + 50 = 100 Write a command-driven program named "ListExpressions" that will accept the following commands:add, listall, listbyoperator, listsummary, exit "add" command will read the expression and save it away in the list "listall" command will display all the expressions "listbyoperator" command will read in the operator and display only expressions with that given operator "listsummary" command will display the total number of expressions, the number of expressions for each operator, the largest and smallest expression values "exit" command will exit the program Requirements:- It must be using the array of pointers to Expression objects to manage the list of Expression objects. Please…