Can someone please help me with this project for my Java Programming class? If you could correct my mistakes for me that would be great.
Q: The question is in the image and I have attached the image below. Please provide a solution in java…
A: A Binary search tree is a tree that follows some order to arrange the elements.
Q: What will be the output of the Java code?
A: Find the output of the given JAVA program from the given options. Basic Information about the given…
Q: Java
A: Answer is in given below:-
Q: What are free useful websites or applications to use to sharpen my skills in Java Programming?
A: Learning Coding online gives you the liberty to learn on your own free will. There are various…
Q: Create an Air-Conditioner project in java
A: // Room.java : Java Room class public class Room { private String name; private…
Q: e of the JAVA output, Thank you.
A: Given :
Q: I need help solving this JAVA. In the first picture half of the code is shown at the bottom and the…
A: I have provided JAVA CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: create a chess game made from Java
A:
Q: Make a registration form using only java language give me the source code and screenshot of outputs…
A:
Q: What are the key constructs in Java required to create a loop? Identify two scenarios that may…
A: Java gives three looping statements that permit programmers to manage the flow of execution by…
Q: Plz do fast And it should be correct How many ways can first and second place be awarded to 10…
A: To award first and second place, we need to choose 2 people from 10 people: now, the number of ways…
Q: Using Java, create a Pac-Man game with graphical interface implemented in Java FX. The minimum rules…
A: package com.zetcode; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension;…
Q: In order to get application software, what is the most efficient method? A relevant example should…
A: Given: In order to get application software, what is the most efficient method? A relevant…
Q: Give five (5) sample source code and simulations of Try Catch Java
A: try{ // code } catch(exception) { // code }
Q: JAVA Do not copy from other websites COde with comments and output screenshot. Correct and…
A: Here for the above program Stack is best option Because when we want to print the negative numbers…
Q: The process of writing Java codes for the computer to perform specific task is called What
A: Actually, computer is a electronic device which takes input and gives the output.
Q: Please use Java to complete the problem in the attatchment. Thank you!
A: Hi and thanks for your question! Unfortunately it looks incomplete. Please resubmit the question…
Q: Hello, I have a javaScript theoretical question. Could you help me with this? My question is:…
A: One technique to troubleshoot a bugged JavaScript program: One technique to troubleshoot a bugged…
Q: xactly is the prototype technique of software development?
A: The prototyping technique of software development is to permit users of the software to assess…
Q: Create a new Java project/class called Equality. Ask the user if they have a job. If they entered…
A: Here I have taken input from the user and stored it into variables. Next, I have used a conditional…
Q: This is for java. I need help asap. Thanks!
A: ANSWER IS TRUE ALL THROW STATEMENTS ARE DIRECTLY WITHIN TRY BLOCKS
Q: What is the difference between the static and final keywords in Java? Can you define any variable in…
A: The main difference between a static and final keyword is that static is keyword is used to define…
Q: Please look at the images for the programming question. I am not sure sure where I should start on…
A: Few things to consider are: 1. variable balance must be available to all methods. Therefore, make…
Q: our puts the better chance you have of pleasing you
A: The code is provided below as,
Q: Please make a second post on a different day. This post can cover anything having to do with Java or…
A: Here I post about the Software Development: Software Development means: The process through…
Q: how do you make this code in java that there are 5 skills listed from 1-5 in the code and when the…
A: ALGORITHM: Declare scanner obj so that we can take input from the user. Take an array of string…
Q: java program that draw a Sierpinski triangle using java graphics 2D , with clear step by step…
A: //Import necessary packages import javax.swing.WindowConstants; import javax.swing.JFrame; import…
Q: I am getting a "Line not found" error in java. I tried commenting out my sem line and that doesn't…
A: Here i trying to explain what is error in code: ---------------- Your error due to : nextaLine()…
Q: What is the distinction between Java's static and final keywords? Can you make any variable in your…
A: The main difference between a static and final keyword is that the static keyword is used to define…
Q: TRY TO MAKE ANY SIMPLE PROGRAM USING JAVA SWING , YOUR PROGRAM MUST HAVE 4 FUNCTIONS OR IT CAN DO 4…
A: As per the question statement, We need to write JAVA Swing code.
Q: nswer it in java l
A: Рrоgrаm Рlаn: • Reаd the integer vаlue frоm the user • Use tо соnseсutive lоорs tо…
Q: write a java program which will make a java project of electric bill payment system. (source code).
A: package BillingSystem;import java.util.Random; public class ElectricityBillingSystem extends…
Q: Write a java project about Electric bill payment system (Without using GUI). Lab project
A: Read the input units from the user. Calculate the billing charge based on the following data: If the…
Q: Create a new java project. Make a class of box, initialize three variables for length, width and…
A: PROGRAM: //Defining class class box{ //Declaring variable double length, width, height;…
Q: Create a Java program that will display the Mission and Vision of PPHS. Use the Project Name:…
A: We have to create a Java program which outputs the following text: Mission To provide quality…
Q: Question 2, You are required to develop a Java program that implements all the required parts below.…
A: Program plan: Include required packages Define a class name myRoot Define a method squareRoot(int…
Q: Please solve this in java, using the Gui system(Jframe, Jpanel, etc) from java, not java fx thanks.
A: import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import…
Q: for library management including GUI. make 5 classes and keep it s
A: Create a java program for library management including GUI.make 5 classes and keep it simple.
Q: can you please transform this code to a java code, I am having A LOT OF difficulities.. I don't care…
A: First we will describe one class and its attributes. Below is the source code for a class called…
Q: What are the Javadoc comments for each class? I am struggling
A: Javadocs are the multi line comments written for each and every method describing parameters and…
Q: Find a way to increase the value of X by 10 while processing a game object in JavaScript?
A: Given that, Find a way to increase the value of X by 10 while processing a game object in…
Q: Compare three IDEs for development using Java - The best interfaces - Easier to handle -…
A: These are the three IDEs for java development:- (i) Eclipse (ii) Kite (iii)BlueJ
Q: Please solve using Java in a simple way ( java code) GUI framework
A: Answer: Java Source Code: /* * To change this license header, choose License Headers in Project…
Q: What is the pattern used in Java I/O library Select one: a. Observer b. Decorator c. Factory
A: There are three patterns given. Among these three we have to select one pattern which is used in…
Q: Make a java code according to the instructions below: FLAMES is a game named after the acronym:…
A: Here I have created an interface named Flames with three methods. Next, I have created a class that…
Q: 1) What is difference between wait() and sleep() method?
A: Given:
Q: Can someone modify my code and leave more specific comments for each step? JAVA
A: Find the required code with necessary comments given as below and output :
Can someone please help me with this project for my Java
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- StringFun.java import java.util.Scanner; // Needed for the Scanner class 2 3 /** Add a class comment and @tags 4 5 */ 6 7 public class StringFun { /** * @param args not used 8 9 10 11 12 public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Please enter your first name: "); 13 14 15 16 17 18 System.out.print("Please enter your last name: "); 19 20 21 //Output the welcome message with name 22 23 24 //Output the length of the name 25 26 27 //Output the username 28 29 30 //Output the initials 31 32 33 //Find and output the first name with switched characters 34 //All Done! } } 35 36 37import java.util.Scanner; public class TriangleArea { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); Triangle triangle1 = new Triangle(); Triangle triangle2 = new Triangle(); // TODO: Read and set base and height for triangle1 (use setBase() and setHeight()) // TODO: Read and set base and height for triangle2 (use setBase() and setHeight()) System.out.println("Triangle with smaller area:"); // TODO: Determine smaller triangle (use getArea()) // and output smaller triangle's info (use printInfo()) }} public class Triangle { private double base; private double height; public void setBase(double userBase){ base = userBase; } public void setHeight(double userHeight) { height = userHeight; } public double getArea() { double area = 0.5 * base * height; return area; } public void printInfo() { System.out.printf("Base:…1- class Excep { 2- public static void main(String[] args){ 3 try{ int arr[]=(1,2}; 4 int x = arr[1]/arr[0]-1; 6 7 catch(ArithmeticException e) 8- { 9. System.out.printin("divide by e"); 10 } 11 catch(ArrayIndexOutofBoundsException e) 12- { 13 System.out.println("wrong indexing"); 14 15 finally 16- { 17 System.out.println("Runtime error"); 18 } 19 }} 20 Answer:
- Please help import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; public class Main { static public double calcTax(double salary, double taxRate) { double taxOwed = 0; taxOwed = (salary * taxRate) / 100; return taxOwed; } public static void main(String[] args) throws IOException { ArrayList salary = new ArrayList(); ArrayList name = new ArrayList(); ArrayList company_name = new ArrayList(); // int lines = 1; try{ File myFile = new File("taxpayer.txt"); Scanner fileReader = new Scanner(myFile); while(fileReader.hasNextLine()){ String data = fileReader.nextLine(); System.out.println(data); String[] dataArr = data.split(", "); name.add(dataArr[0] + " "+ dataArr[1] );…I have the following code: import java.util.*; import java.io.*; public class GradeBook { publicstaticvoidmain(String[] args)throwsIOException{ // TODO Auto-generated method stub File infile =newFile("students.dat"); Scanner in =newScanner(infile); while(in.hasNext()){ // Read information form file and create a student object and print String name = in.nextLine(); Student student =newStudent(name, in.nextLine()); for(int i =1; i <=4;++i){ student.setQuiz(i, in.nextInt()); } student.setMidtrmExm(in.nextInt()); student.setFinalExm(in.nextInt()); in.nextLine(); // Calculate grade and letter grade; double overallQuizScore=0.0,score=0.0; for(int i=1;i<=student.NUM_QUIZZES;i++) { overallQuizScore+=(student.getQuiz(i)/student.QUIZ_MAX_POINTS)*100; } overallQuizScore = (overallQuizScore/4)*0.30; score =…import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String[] names = { "Ryley", "Edan", "Reagan", "Henry", "Caius", "Jane", "Guto", "Sonya", "Tyrese", "Johnny" }; int index; index = scnr.nextInt(); /* Type your code here. */ }}
- import java.util.Scanner; public class PetInformation {public static void main(String[] args) {Scanner scnr = new Scanner(System.in); Pet myPet = new Pet(); Cat myCat = new Cat(); String petName, catName, catBreed; int petAge, catAge; petName = scnr.nextLine(); petAge = scnr.nextInt(); scnr.nextLine(); catName = scnr.nextLine(); catAge = scnr.nextInt(); scnr.nextLine(); catBreed = scnr.nextLine(); // Create generic pet (using petName, petAge) and then call printInfo myPet.setName(petName); myPet.setAge(petAge); myPet.printInfo(); // Create cat pet (using catName, catAge, catBreed) and then call printInfo myCat.setName(catName); myCat.setAge(catAge); myCat.setBreed(catBreed); myCat.printInfo(); // Use getBreed(), to output the breed of the cat System.out.println(" Breed: " + myCat.getBreed());}}public int getPowerUse(){ return super.getPowerUse() + contents * powerRating; //////////////////////////////////////////////// if (args[0].equals("REFRIGERATOR")) { String manufacturer = args[1]; String serialNo = args[2]; int basePower = Integer.parseInt(args[3]); int powerRating =Integer.parseInt(args[4]); int capacity = Integer.parseInt(args[5]); Refrigerator rf=new Refrigerator(manufacturer,serialNo, basePower, powerRating, capacity); things[rf.getId()]=rf; returnval = rf.getId(); }import java.util.Scanner; public class StudentScores { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); final int SCORES_SIZE = 4; int[] lowerScores = new int[SCORES_SIZE]; int i; for (i = 0; i < lowerScores.length; ++i) { lowerScores[i] = scnr.nextInt(); } for (i = 0; i < lowerScores.length; ++i) { System.out.print(lowerScores[i] + " "); } System.out.println(); } }
- Write all the code within the main method in the TestTruck class below. Implement the following functionality. Construct two Truck objects: one with any make and model you choose and the second object with gas tank capacity 10. If an exception occurs, print the stack trace. Print both Truck objects that were constructed. import java.lang.IllegalArgumentException ; public class TestTruck { public static void main( String[] args ) { // write your code herepublic class SharedCounter {int counter = 0;public static void main(String [] args) throws InterruptedException{IntCell intCell = new IntCell();//Create incrementer and decrementer objects and pass intCell to the constructor. //Call .start() on both, then .join() on both.//Finally, print the value of intcell: intCell.getVal();} } class IntCell{private int val = 0;synchronized void increment() {val++;}synchronized void decrement() {val--;}int getVal() {return this.val;}} class Incrementer extends Thread{//IntCell reference //Set via parameterized constructor //Override the run method with a for loop that runs 10000 times and calls intCell.increment();} class Decrementer extends Thread{//IntCell reference //Set via parameterized constructor //Override the run method with a for loop that runs 10000 times and calls intCell.decrement();}class overload { int x; double y; void add(int a , int b) { x = a + b; } void add(double c , double d) { y = c + d; } overload() { this.x 0; %3D this.y = 0; } %3D } class Overload_methods { public static void main(String args[]) { overload obj int a = 2; double b - 3.2; obj.add(a, a); obj.add(b, b); System.out.println(obj.x + } = new overload(); + obj.y); } #3Run the code