Computer Science
Q: Create an drawing panel of at least 600 x 600. Draw filled-in shapes of at least two…
A: Program Instruction The function draw has been modified to draw a smiling face. In the function…
Q: Write a Java application with (comments) for Car Care Shop that shows a user a list of available…
A: Before understanding program we need to know the following method. In Java equalsIgnoreCase() method…
Q: Please include a gui for the encryption and decryption java code. Example of the gui in the photos…
A: java program can be used to write applications on the different types of the platforms that can run…
Q: Java Program for a Christmas List - NO GUI ** Please include ULM and comments in the code. **…
A: Answer: our guideline is answer the first three question from the first question.
Q: *Create a rectangle class using all methods given below.* *Use Java* Class Rectangle will have…
A: Define Rectangle class to store the dimensions of a rectangle. Define a parametrize constructor to…
Q: s shown in the Figure. (Hint: A point is in the rectangle if its horizontal distance to (0, 0) is…
A: Analysis of the problem: There is a rectangle with vertices a,b,c,d(let). The position of the…
Q: Write a recursive method that is passed a single int parameter, N, and create and return a String…
A: Hi I have created a recursive program that sees 1. N is odd or even eg. if N=4, then odd numbers…
Q: 6.6 LAB: Sieve of Sundaram In this lab, you are going to implement the "Sieve of Sundaram" algorithm…
A: According to the Question below the Solution:
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Actually, the code has given below:
Q: JPNav is a program to help navigate people, telling them wether or not they can reach their…
A: A string in C is defined as a character array. The character array can be assigned a string value in…
Q: UOWD Library is asking you to write a Java program that manages all the items in the Library. The…
A: Here Are all the files: Media: package medialibrary; public class Media { String mediaType;…
Q: Write a java application for an Auto Car shop that shows a user a list of available services: oil…
A: The code is given below.
Q: Using Java Eclipse IDE do the following program. Programming exercise similar to 9.1, Change…
A: Programming instructions: First, create a class “Square” and then declare two variables width and…
Q: class Point: """ A point in a two-dimensional coordinate plane """ def…
A: Code is given below. class Point: """ A point in a two-dimensional coordinate plane """ def…
Q: Write a Java method splitName() that takes a string (that contains 1 word or more (space-…
A: Sample Response: //Java codeimport java.util.Scanner; public class splitName{ //splitName method…
Q: Create a JavaFX application that lets the user play the game of rock, paper, scissors against the…
A: Actually, Java is a high level programming language... And also object oriented .It. Is a platform…
Q: Please paste the code for each completed class. Do not use ArrayList. Create Playlist.java,…
A: Solution: Note: Please make sure all the file in same folder while execution. make sure it should…
Q: Write a program that reads five cards from the user, then analyzes the cards and prints out the…
A: As no programming language is mention. So i am using c++.
Q: In JavaScript, there are two types of comments: 1. Single-line comments start with // 2. Multi-line…
A: Coded using JavaScript.
Q: Using Javascript and HTML: An interesting application of computers is drawing graphs and bar charts…
A: <html><head><title>Drawing Graph and Bar Chart</title><script>var…
Q: Transcribed Image Text Write a Java program that asks the user to enter 5 odd integers. When the…
A: Java is a high-level programming language developed by Sun Microsystems. Instead, Java programs are…
Q: please remove break to exit the loop. Find another way to exit loops without using breaks in the…
A: Required: please remove break to exit the loop. Find another way to exit loops without using breaks…
Q: Please create a class named BST based on the information in the second screenshot. You don't have to…
A: Answer is given below .
Q: mplement an ADT that can used as a Tic-Tac-Toe game board. Your ADT will implement the interface…
A: Step to build Tic-Tac-Toe game using java: Import packages Initialize User Interface Adding Actions…
Q: 4) In each below, a segment of Java code is given. Draw a picture that shows the final result of the…
A: Linked List: A linked list is a linear data structure that is basically a collection of nodes. These…
Q: public static String getFlag(int size, char color1, char color2, char color3) - This method returns…
A: The program is written in java class Main { public static void main(String[] args) {…
Q: // Application allows user to enter a series of words // and displays them in reverse order import…
A: // Application allows user to enter a series of words// and displays them in reverse orderimport…
Q: import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.ArrayList;…
A: Q
Q: Create a class called "Session12Lab". Create a method public static String[] mergeArrays(String[]…
A: Please find the answer below :
Q: 2. Create a Java project named clsProject2 Create a method called public static String [][]…
A: Import the required classes from io package like File and Scanner class. Method get_years-quarters…
Q: Create a program which will read a phrase from the user and create a framed version of it for…
A: 1.#Begin 2.Phrase = input("Please Enter a Phrase:\t") 3.Position = input("Please Enter the…
Q: Hello, I've attached the prompt for this assignment. I need help creating code to delete and update…
A: The code is given below. import java.util.*; public class ContactService { //Start with an…
Q: public class Node { int key; Node left, right, parent; public Node () {} public Node (int num) { key…
A: Answer:
Q: class ADSockDrawer(object): def init _(self): self.drawer = AD() def add_sock (self, color): """Adds…
A: Source code: #include <iostream> #include <vector> #include <string> using…
Q: Must be in JAVA. Please Attached text code and output Create a new project and name it "Lab10" Write…
A: import java.util.*; public class Main { public static ArrayList<Integer>…
Q: Java, the user selects an item from the text files ranging 1-15, repeats the loop until 'q'. the…
A: import java.io.*; import java.util.*; class BillProcessor { public static void…
Q: ss Point: """ A point in a two-dimensional coordinate plane """ def…
A: The move method in WindTurbine calls the move method from Rectangle, which causes the turbine's…
Q: ConnectedCircles.java, allows the userto create circles and determine whether they are connected.…
A: Program: Filename: "Exercise.java" //import the required packages import java.util.ArrayList; import…
Q: Part 2: Write a JavaFX program that simulates a traffic light as shown below. The program should let…
A: JavaFX is a Java library that is used to develop Desktop applications as well as Rich Internet…
Q: In a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their…
A: In a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their…
Q: plus sign is the symbol used for addition in Mathematics. Usually, the plus sign is written as a…
A: The code for the above given question is given below:
Q: Java Program for a Secret Santa gift exchange - NO GUI ** Please include ULM and comments in code.…
A: I will create two classes Participant ParticipantManager Please add other classes as per your…
Q: 3- Implement onContextItemSelected(). When the user selects a menu item, the system calls this…
A: It is defined as a floating menu that appears when the user performs a long-click on an element. It…
Q: Python Development Lab In Merworld there exists 2 coins of different denominations types 5-peso…
A: Given in the question that we have to develop a python code to find out the number of ways to…
Q: In javascript, List all the odd integer numbers between 1 and 100 that are multiples of 3. Each…
A: Program approach: Declare a for loop that will start from 1 and run until 100. Use if((i%2)!=0) to…
Q: Create a new Java project and make sure "Create project from template" is UNCHECKED). Use a…
A:
Q: Modify the Lab 6 java applet that produces a Bulls Eye with six concentric circles using two colors…
A: In case of any query do comment. Please rate answer as well. Thanks Code: package Far; import…
Computer Science
A Java swing program that lets the user draw a line that can be individually deleted or moved.
make a JPanel to allow users to draw a line with their mouse, move the line to wherever, and delete each individual line chosen by the user.
Use JRadioButton and/or JComboBox in a separate JPanel to allow users to choose to draw, move, or delete a line.
The user should be able to have multiple lines at once
Whenever necessary, the user should be prompted with instructions on how to continue or what is wrong. (For example; conformation prompt for deleting a line, or which line the user wants to delete)
Step by step
Solved in 2 steps
- There are small examples online of programs written in Go. Go (no pun intended!) to http://golang.org and in the Examples drop-down box below the code window, select Fibonacci Closure. Click Pop Out to get a bigger window to see the code. The Fibonacci sequence is a famous sequence of numbers invented by Leonardo Fibonacci in the year 1202 to model the population growth of rabbits. The first two numbers in the sequence are 1, 1. Successive numbers in the sequence are obtained by adding the two previous numbers. For example, the third Fibonacci number is the sum of the first two Fibonacci numbers, . Write the first six numbers in the Fibonacci sequence. Compile and run the Fibonacci Closure Go program. What is the output? Some of the Go syntax is similar to C/C++. How does Go indicate comments? One bit of C/C++ syntax is missing from Go. On the FAQ page, what does it say about ending statements with semicolons? Can you guess the semantics (meaning) of the following statement?…Using Java's card graphics, create a card game in which the dealer shuffles the deck and deals 13 cards to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat 4 times so all the cards are dealt eventually. Internally, the player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again."Please help me with this using java. If yo can't do all of them just do #1 and #3 1. Create a bubble sort code 2. Create a matching games like the on below. And add a reset button ( refer to image below) 3. please add comments to the tower of Hanoi java code below import java.util.Scanner; public class TowerOfHanoi { public static void shift(int n, String startPole, String intermediatePole, String endPole) { if (n == 0) { return; } shift(n - 1, startPole, endPole, intermediatePole); System.out.println("Move \"" + n + "\" from " + startPole + " --> " + endPole); shift(n - 1, intermediatePole, startPole, endPole); } public static void main(String[] args) { System.out.print("Enter number of discs: "); Scanner scanner = new Scanner(System.in); int numberOfDiscs = scanner.nextInt(); shift(numberOfDiscs, "Pole1", "Pole2", "Pole3"); } }
- instructions are in photo and links in photos has code which I have pasted to make it easy to copy. Below is my professor code for Sudoku #2, please make a different version of this code with the same functions as i can not use my teacher's code Sudoku #2 code import java.util.*;import java.io.*; public class MySudokuBoard {public final int SIZE = 9;protected char[][] myBoard;public MySudokuBoard(String theFile) {myBoard = new char[SIZE][SIZE];try {Scanner file = new Scanner(new File(theFile));for(int row = 0; row < SIZE; row++) {String theLine = file.nextLine();for(int col = 0; col < theLine.length(); col++) {myBoard[row][col] = theLine.charAt(col);}}} catch(Exception e) {System.out.println("Something went wrong :(");e.printStackTrace();}}public boolean isSolved() {if(!isValid())return false;Map<Character,Integer> map = new HashMap<>();for(char[] row : myBoard) {for(char cell : row) {if(map.containsKey(cell))map.put(cell, map.get(cell) + 1);elsemap.put(cell, 1);}}//…UOWD Library is asking you to write a Java program that manages all the items in the Library. The library has books, journals, and media (DVD for example). All items have a name, author(s), and year of publication. A journal also has a volume number, while a media has a type (audio/video/interactive). The user of your program should be able to add an item, delete an item, change information of an item, list all items in a specific category (book, journal, or media), and print all items (from all categories). A menu asks the user which operation s/he wants to perform. Important: make use of collections, inheritance, interfaces, and exception handling wherever appropriate.Modify the Lab 6 java applet that produces a Bulls Eye with six concentric circles usingtwo colors as shown below. The applet should include a method that creates anddisplays a filled circle. The for loop should be modified to use the method. (See pg. 376,Programming Project 11, Savitch).The fillCircle method can be placed above or below the paint method and should bedefined using the following:private void fillCircle (Graphics canvas, int X, int Y, int diameter, Color color){canvas.setColor(color);canvas.fillOval(X, Y, diameter, diameter);}The program should continue to use Named Constants to establish and maintain the xand y settings for the circles and the amount to change the diameter for each circle.Use a for loop to control the drawing of each of the 6 circles. Within the loop, increasethe x, y settings; reduce the diameter for the new circle; and alternate the colors whencalling the drawCircle method. Test your code using the AppletViewer.Sample using AppletView
- Create a program which will read a phrase from the user and create a framed version of it for printing. For example, the phrase "hello world"would result in: ********* * hello * * world * ********* Whereas the phrase "the sky is falling"might be: *********** * the * * sky * * is * * falling * *********** Or: *********** * the * * sky * * is * * falling * *********** Or even: *********** * the * * sky * * is * * falling * *********** Depending on whether or not the user asked for left, centered, or right justification — respectively — of the phrase's words within the frame. Note how the frame exactly fits the phrase based on the longest word within. Neat, eh? The phrase "O | -+- | /-\"when centered would become: ******* * O * * | * * -+- * * | * * /-\ * ******* (Okay, so it's a sad excuse for a stick figure, but hey! I've never claimed to be a great good decent artist, now…Using java BlueJ write a class Forest that has a method paintTree( )that displays one tree. Use BorderLayoutManager in this class.The user should be able to enter the number of trees in the forest in a JTextFieldUsing a loop statement, draw a forest by repeatedly invoking the method paintTree ( ).The forest should consist of randomly located trees with the random color of the tree tops.The user should be able to redraw a forest multiple times by entering a different number of trees intoJTextField (the previous picture will be replaced by a new forest)Method paintTree ( ) should have 4 parameters:Graphics g, x and y coordinates,treeColor - color of the tree topx, y and treeColor must be generated randomly for each tree.In Java. Ask the user for a starting point and ending point. Sort the user list using the method in the previous question, but only display the users within the entered range. I already have a code, but it doesn't sort right. I believe there is something wrong. Here is the data text. I can't copy and paste it because it is too long. https://textuploader.com/t1ol7 The image without the red highlight should be the correct output. Code:import java.io.File;import java.io.FileNotFoundException;import java.util.ArrayList;import java.util.Scanner;public class Users{public static void main(String[] args){String filename = "user-database.txt";Scanner infile = null;try {infile = new Scanner(new File(filename));} catch (FileNotFoundException e) {System.out.println(e.getMessage());}ArrayList usernames = new ArrayList();ArrayList passwords = new ArrayList();int start, end;Scanner input = new Scanner(System.in);System.out.println("Enter a starting point and ending point");start =…
- use java Write a main application called yupi.java, and a GUI (that extends JFrame) called VowelGUI.java.The main program should open a file called “input.txt” which will contain a paragraph.Read the lines from the file until there are no more. For each line, count the number of individualvowels in that line, using a counter for the vowels ‘A’ and ‘a’, a counter for the vowels ‘E’ and ‘e’, and soforth.The GUI should have a grid layout of one row and two columns (column 0 and 1). Column 0 shouldcontain the original text from the file. Column 1 should contain 5 lines displaying the count of each ofthe vowels.JAVA PPROGRAM ASAP Please Modify this program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases. It does not pass the test cases when I upload it to Hypergrade. Because RIGHT NOW IT PASSES 0 OUT OF 1 TEST CASES. I have provided the failed the test cases and the inputs as a screenshot. The program must pass the test case when uploaded to Hypergrade. import java.io.File;import java.io.FileNotFoundException;import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); String fileName; System.out.println("Please enter the file name or type QUIT to exit:"); fileName = keyboard.nextLine().trim(); while (!fileName.equalsIgnoreCase("QUIT")) { File file = new File(fileName); if (file.exists()) { int wordCount = countWords(file); System.out.println("Total number of words: " + wordCount + "\n);…Make a python program that reads a csv file and graph the annual sales variation of some vehicles. Allow the user to choose which vehicles to display on the graph (determine a maximum number of vehicles to display between 3 and 6). For example, you can define that it will display a maximum of 4 vehicles, ask the user which ones he wants to display and select 4 out of 10 options that you display to the user.