what am I doing wrong? and please just fix my program and don't give me any other correct programs you have, just FIX it.
Q: In the AddTwo program, which statement halts the program?
A: Statement halting the program In the AddTwo program, the ADD instruction is used to add the…
Q: Hello, I am having trouble having this code run on replit. I am using python and I am unsure why it…
A: In this question we have to look over the python code error and provide solution for the same. Let's…
Q: What will be the output of the program ?Explain.
A: Printf statement in c programming is used to display value or message on screen.
Q: Do you think that the actual creation of the program is the most important step?
A: Methodology for Software Development: To improve the design, the software development process…
Q: dure, what a
A: There is no full procedure for tending to each of the mistakes in your code, obviously, however…
Q: Are you a fan of coding? Isn't that amusing? Is this a difficult task? Are you having difficulty?…
A: Introduction: One of the most difficult components of learning to programme is figuring out how to…
Q: Kindly answer the attached question using python and without using any of its libraries
A: For above graph given we can find mother vertex using DEPTH FIRST APPROACH & using O(V+E) time.…
Q: Why is it impossible to detect certain program errors at compile time, even though they can be…
A: Here we will discuss Why is it impossible to detect certain program errors at compile time, even…
Q: you will be using gpiozero library to write a code for a 4-eyes obstacle avoider using Raspberry pi.…
A: The following is the python code which can be used to create a Robot with the above mentioned…
Q: An easy way to tell the difference between the two is to look at the code that runs on the computer.…
A: System software is used to maintain a computer system's functionality, manage it, and enhance its…
Q: What happens if you execute a programme that has an error?
A: Given: What happens if you execute a programme that has an error?
Q: Write a script that will prompt the user to input a number from 1 – 9 only and display the figure…
A: Start. Take the number between 1 to 9. Print the Pattern. Exit.
Q: I want to apply this code to Mary's software with screenshots
A: Code: Input /Takes user inputStore X /Stores user input to XInput /Takes user inputStore Y…
Q: How does one go about writing code for a computer? Before deciding, think about the following:
A: What exactly is a programme? A computer programme is a precise strategy or technique for addressing…
Q: Kindly answer the attached question using python without using any of its libraries
A: list=[LA15,LA16, LA15,LA22,LA31,LA32,LA126,LA127,LA141,LA169]: print("List of course and course…
Q: Which program loads executable code into the CPU so that it may run from main memory?
A: Main memory holds instructions and data temporary but for executables it is loaded into CPU for…
Q: I have a task regarding programming that i have posted. I would like to understand as to what…
A: The above code is a code of pointers. These are the variables that contains the memory address of…
Q: There is no output to this. Kindly read the instructions and do as requested. Thank you
A: //Code in java to rotate the letter "C" at 360 degree class Rotation { public static void…
Q: I need help with my homework on python, but I dont know how to do it.
A: #see the below code
Q: If you execute the programme with a mistake, what consequences will it have?
A: Introduction: There are two sorts of mistakes in general: Error at runtime: This sort of error…
Q: Do you have a strong interest in programming? Is it a source of entertainment? Is it a difficult…
A: The answer :
Q: Write a program that allows the user to play a simplified slot machine.
A: from random import *import timeimport sys reel_1 = ''reel_2 = ''reel_3 = ''bank = 0current_bet =…
Q: What is the output of the program? 2. How does the program work?
A: For the given code , we need to provide the output the program would generate when compiled and…
Q: What is the best way to design a software that controls a radiation therapy machine for healthcare…
A: Solution: The challenge at hand is one of software development engineering, and the goal is to…
Q: What is the output of the program above? Your answer What does the program above do? Your answer
A: Language is one of the most widely used programming language which has been used to create different…
Q: Would you mind telling me briefly what was wrong with the original code?
A: I could see the given code is running and it's yielding required output as well
Q: How to execute the program (i.e. multiplication of two no’s) in a Hypothetical machine?
A: The hypothetical computer to an understanding the model or abstraction of the step-by-step behavior…
Q: What are paprameters, and how can you use them to estimate a program's performance? Why is it…
A: A program is a collection of instructions that a computer executes to complete a task. [computing]…
Q: How can the resilience of your program be measured?
A: Introduction: A software product's dependability can be measured using reliability measures. The…
Q: program counter
A: About program counter
Q: What do you mean by “beta version” of a computer program
A: Actually, given question regarding beta version.
Q: In debugging a program, A. we are searching for availability of errors B. we want to see whether…
A: Debugging- - Debugging is the process of searching a error in program. - It…
Q: What exactly are you referring to when you say "create a program" in this context?
A: Definition: The process of putting a programme into action is referred to as "programme…
Q: Even if you have no more bugs to fix, can you say they are no more errors in a program. Why
A: Solution :
Q: Suppose you are a software engineer. Your friend owns a grocery shop. He asks you to write an…
A: Do you think your friend should have asked your permission to give away your software? if friend…
Q: Why is it so hard to determine whether a software is correct? The best way to discover problems in…
A: Introduction: For the sake of argument, I'll list seven reasons why software development is so…
Q: If you had to choose, would you prefer to write an application in assembly code?
A: Introduction If you had to choose, would you prefer to write an application in assembly code?
Q: What will be the value of AL after running code? MOV AL, 10 MOV AH, 10 MOV BL, 5 MOV BH, 5 MUL BL
A: 1. MOV AL,10 in the above instruction the decimal value of 10 will be store in the accumulator…
Q: Why can't I run the code?
A: Code given in the question working fine. If an error is generating at line 11 i.e., ofstream…
Q: We created a person whose name is "quit" - probably not what the programmer had in mind.
A: public class Person //create class{ private String name; //declaring instance variable…
Q: asked to write a program that converts from Celsius to Fahrenheit and Fahrenheit to Celsius, what…
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other…
Q: What can you do to make sure that code is entered into the source-control system correctly
A: Answer : To make sure that our source code is entered into the source control system correctly we…
what am I doing wrong?
and please just fix my
Step by step
Solved in 2 steps
- EXPLAIN EACH OF THE FOLLOWING LINE. import java.awt.*; import java.awt.geom.*;3 .import java.awt.font.*;4. import javax.swing.*; public class Main extends JPanel{ 6. static int angdeg=0; 7. @Override 8. public void paint(Graphics g){ 9. Graphics2D g2d = (Graphics2D) g; 10.g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.V ALUE_ANTIALIAS_ON); 11. g2d.setColor(Color.white); 12. g2d.fillRect(0,0,getWidth(),getHeight()); 13. Font font = new Font("serif",Font.BOLD,50); 14. g2d.setFont(font); 15.FontRenderContext frc = g2d.getFontRenderContext(); 16.TextLayout layout = new TextLayout("JAVA", font, frc); 17. double sw = layout.getBounds().getWidth(); 18. double sh = layout.getBounds().getHeight(); 19. AffineTransform saveTransform=g2d.getTransform(); 20. g2d.setColor(Color.black); 21. Rectangle rect = this.getBounds(); 22.…The following is a Java code for a Design Patterns: Strategy Pattern in object oriented design programming. Execute the code in Netbeans and provide screenshots to verify the code runs successfully, Draw a UML class diagram to model the program. File : Billing.java public interface Billing { public double getDiscount();} File : LoyaltyBilling.java public class LoyaltyBilling implements Billing{ @Override public double getDiscount() { return 20.00; } } File : NormalBilling.java public class NormalBilling implements Billing{ @Override public double getDiscount() { return 0; } } File : SeasonalBilling.java public class SeasonalBilling implements Billing{ @Override public double getDiscount() { return 10; } } File :SaleBilling.java public class SaleBilling implements Billing{ @Override public double getDiscount() { return 50; } } File : Product.java public class Product { private String name; private double…Implement the following tasks by using concepts of object-oriented programming (Java). i. Create a generic class with a type parameter that simulates drawing an item at random out of a box. This class could be used for simulating a random drawing. For example, the box might contain Strings representing names written on a slip of paper, or the box might contain Integers representing a random drawing for a lottery based on numeric lottery picks. Create an add method that allows the user of the class to add an object of the specified type along with an isEmpty method that determines whether or not the box is empty. Finally, your class should have a drawItem method that randomly selects an object from the box and returns it. If the user attempts to drawn an item out of an empty box, return null. Write a main method that tests your class.ii. The following is a short snippet of code that simulates rolling a 6-sided dice 100 times. There is an equal chance of rolling any digit from 1 to…
- Draw the UML diagram for the classes and its relationships for this code: import java.util.ArrayList;public class Main { public static void main(String[] args) {Market superMarket = new Market(10);}class Market { private ArrayList<String> fruits = new ArrayList<>(); private int fruitsNumber; public Market(int fruitsNumber) { if (fruitsNumber > 0) { this.fruitsNumber = fruitsNumber; }else { throw new IllegalArgumentException("This argument is not valid"); } } private synchronized boolean isFull() { return fruits.size() == this.fruitsNumber; } private synchronized boolean isEmpty() { return fruits.isEmpty(); } public synchronized void farmer(String fruit) { if (isFull()) { System.out.println("We can not accept more fruites at the moment !!"); try { wait(); }catch (InterruptedException e) { System.out.println("Interruption"); } } fruits.add(fruit); System.out.printf("fruit : %s is added !!!%n", fruit); }…Do the following program in Java Eclipse. Java Class that can be used to create a Fruit object as described below: A fruit has - a: - Date of Harvest -Color -Weight -Number of seeds a. Add all instance variables. b. The class must have getters and setters for all instance variables. c. The class must have two constructors, a no-args and a constructor that receives input for each instance variables. d. The parent class is abstract. e. its 1 abstract method and has toString() method f. its 2 children (concrete) also have toString() methods.Write a java interface code class according to the instructions below: 1. Write an interface name InterfaceSet with the following components: Attribute: max an integer variable initialize to 10, static and final Method signatures: - public void add(int e) -> this method adds e in an array., e is not added in the array if e already exists in the array. Attribute count in increment every successful add of e. - public void display( ) -> display the contents of the array (NOTE: the array is an attribute in the class later) - public int count( ) -> returns the value of count (NOTE: count is an attribute in the class later) - public boolean isElementOf(int e) -> returns true if e is in the array false if not - public int getElement(int index) -> returns the value in array at index - public Set union(Set s) -> returns the union Example: current Object set[] ={1,2,3}; Set s[] = {1,3,10,5}; returns: Set union[]={1,2,3,10,5}; NOTE: current object…
- Consider the following code in Java 8:public interface Runnable{void run() ;}public final class Caller {public static void call (String before, String after, Runnable r) (System.out.println(before);r. run() ;System.out.println(after);} }public class MyClass{public static void main(String args[]) (Caller.call("BEFORE", "AFTER",); } }Complete the blark line with some code so that the program prints the folowing to the output: BEFOREHi there!AFTERRun the following Java code in Netbeans and draw a UML class diagram to model the program. Java Code: //include the required packageimport java.io.*;import java.util.*;//create a main classpublic class experiment{ //definition of the main function public static void main(String args[]) { //create the object of the Scanner class Scanner in=new Scanner(System.in); //declare the required variables and arrays int time[]=new int[10]; float weight[]=new float[10]; String get; char ch; int i=0; //start of do while loop do { //try block try { System.out.print("\nEnter the…Java code; object oriented program; private static void Togrid(source s) { grid g1 = new grid("s"); grid g2= new grid("between"); layout b= new layout("press"); s.addObject(g1);s.addObject(g2);s.addObject(b); Using above test program(is added after following feature is implanted); How to write a code of instance method type void with parameter of "Source s" that adds object into array. public void addObject(Source c){} Using above method, how to code an instance method of type Object[] without parameter that returns new array with object that was added into array. public Object[] getObject(){}
- Write a BSTApp JAVA class to create and manipulate a BST object (making the different method calls). Create the BST by inputting 60, 70, 20, 10, 40, 50, 30 in an initially empty BST.Modify the given codes to remove the compilation errors. 1. public interface Carnivore { int pieces = 10; public static void eatGrass(); public int chew() { return 13; } } 2. Interface HasWings { public int getNumberOfWings(); } abstract class Insect implements HasWings { abstract int getNumberOfLegs(); } public class Dragonfly extends Insect { int getNumberOfLegs() { return 6; } }JAVA Program ASAP Modify this program below so it is a Filesorting.java program so it passes all the test cases when I upload it to Hypergrade. I have provided the failed test cases a screenshot. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.ArrayList;import java.util.Arrays;public class Main { public static void main(String[] args) { try { BufferedReader reader = new BufferedReader(new FileReader(getFileName())); String line; while ((line = reader.readLine()) != null) { processAndPrintSortedLine(line); } reader.close(); } catch (IOException e) { System.out.println("Error reading the file: " + e.getMessage()); } } private static String getFileName() { String fileName; java.util.Scanner scanner = new java.util.Scanner(System.in); do { System.out.println("Please enter the file name or type…