his is my code but it does not match the sample code please help
Q: Think the government and law enforcement agencies should have access to Facebook and other social…
A: Introduction: Facebook. College administrations and police authorities utilise Facebook as evidence…
Q: Why are static routes a necessity in modern networks? What is the drawback to using static routes in…
A: Static routes a necessity in modern networks: For tiny networks with only one link to an external…
Q: Explain Memory operation?
A:
Q: What is the basic principle of RMI architecture ?
A: The solution is discussed in the below step
Q: We'll delve into the relevance of this endeavour and examine five (5) areas of concern related to…
A: According to the information given:- We have to define the relevance of this endeavor and examine…
Q: How would you go about finding the source of a computer malfunction and fixing it?
A: Introduction: If you were troubleshooting a computer error code, what steps would you take? No…
Q: mport java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import…
A: The answer is given below.
Q: circuit
A: Solution - In the given question,we have to Design and implement a combinational circuit that adds…
Q: Create a mockup of your personal website and your first home page. Your personal website should…
A: Algorithm : 1. Create a grid with three columns and three rows. 2. Place an image or logo in the…
Q: Write a program which finds the maximum and minimum of a set of Hoats stored in the You can assume…
A: The C programming code is given below:
Q: how to use and gain access to cloud-based software and services.
A: Introduction: The following is what this question reveals about how cloud-based services and apps…
Q: Write a program that calculates the average of a group of test scores, where the lowest score in the…
A: #include <iostream> #include <iomanip> using namespace std; // function prototypes void…
Q: Draw and explain the block diagram of microprocessor.
A:
Q: How can collisions in hash tables be avoided? How can they be stopped, and what causes them? If it's…
A: INTRODUCTION: An instance of a collision in the hash table: Collisions in hash tables occur when the…
Q: Apply what you know about normative ethics by making a case for or against letting students with…
A: Introduction: Normative ethics is a straightforward branch of morality that provides us with a set…
Q: Design a Mealy machine that has the following behavior Inputs= {0, 1} Outputs= {0, 1} The…
A: It is the mathematical operation on binary numbers. It is used for computation as a method of signed…
Q: Write an ERQ for the following prompt: "Evaluate one model of memory with reference to research…
A: Introduction: Describe your strategy in the essay.The purpose of the following essay is to evaluate…
Q: Find out how people are able to avoid their moral responsibilities and violate societal norms…
A: Introduction: Technology is undermining societal standards. First, it facilitates isolation.…
Q: How do I print the Uppercase letters without the commas?
A: After updating the code, I have provided C++ CODE along with CODE SCREENSHOT and OUTPUT…
Q: Q6 Which of the following statements is true? We can use a finite-state automaton to capture all…
A: Transition-based parsing:- One tree is the sole thing that a transition-based dependency parser…
Q: 1. Write a SQL query to list the names all employees and their address who work for the department…
A: Please find the answers in the following steps.
Q: What is DGC ? And how does it work?
A: in the following section we will be discussing about what is DGC in java programming and discuss…
Q: What is an equivalence partition? Give an example Explain what is meant by system availability
A: Introduction: The Equivalence Partitioning Method is another name for the Equivalence class…
Q: Write an application to test the HuffmanTree class. Your application will need to read a text file…
A: The answer provided below has been developed in a clear step by step manner.
Q: java method called switchThem that acc
A: Solution - In the given question, we have to write a java method called switchThem that accepts two…
Q: Think about how important wireless networks are in the still-developing nations of today. In a…
A: INTRODUCTION: Wireless networks: Wireless networking is a method that homes, telecommunications…
Q: architecture x86_64
A: Given :- In the above given question , the statement is mention in the above given question Need…
Q: Exercise 6.2.1: Translate the arithmetic expression a +-(b + c) into: a) A syntax tree. b)…
A: Introduction : Syntax Tree: It is a representation of code or expression in form of a tree. The…
Q: What are the two types of services that can be purchased using apps online? What makes each of these…
A: Given: Describe two distinct categories of services that may be accessed by Internet users via the…
Q: Explain the architechure of a Servlet.
A: Servlets handle data/requests sent by clients, create and format results , send results back to the…
Q: Identify the various threats that HTTPS may be protected against, as well as how it does so.
A: Definition: HTTPS is a protocol that is used in websites to protect them from users who are not…
Q: Error Unbound LocalError local variable 'args' referenced before assignment
A: The above question is solved in step 2 :-
Q: Define Subroutine.
A: The question has been answered in step2
Q: What is the role of Remote Interface in RMI ?
A: Introduction In this question we are asked about the role of remote interface in RMI.
Q: Q3) Write a program to find X, where X = Σ τη di=1 n-i xi
A: We need to write a C++ code for the sum of the given series.
Q: Write a Visual Basics program that asks the user to enter a 10-character telephone number in the…
A: The code snippet in Python: def main(): #character string numeric_phone="" #user inputs…
Q: Define - ULP
A: Lets see the solution.
Q: For C++ I am kinda suck for this part and for pseudocode too Assume that you have a file that…
A: ANSWER:-
Q: What are the steps involved to make work a RMI program ?
A: Introduction Remote method invocation (RMI) allows a Java object to call a method on another…
Q: Explain the architechure of a Servlet.
A: The question has been answered in step2
Q: EX3: Write a complete C++ program to implement a Employee class.
A: Stage 1 - Incorporate the expected header documents (iostream.h, conio.h, and windows.h for colors).…
Q: In your perspective, how risky is it to make use of such a programme? Do you believe it may possibly…
A: Introduction: Understanding how to adjust the privacy settings in an app is essential. When an app…
Q: What is meant by binding in RMI ?
A:
Q: How do you ate Constructors in a. Create a method and name it with the same name as class name b.…
A: The process of creating a set of instructions that tells a computer how to perform a task is known…
Q: What types of assumptions about the culprit are common when an unlawful behaviour occurs on the…
A: Introduction: Computer security is divided into several subfields, one of which is internet…
Q: Given an array of numbers 1..... we are interested in finding D = max (x; :- ₁) where 1 ≤ i ≤ i ≤ n…
A: Here in this question we are given an array of numbers and we are supposed to find the maximum…
Q: Explain the execution of three-instruction program.
A: The above question is solved in step 2 :-
Q: What is meant by register file?
A: Given: Explain register file.
Q: Explain the write cycle waveform for memory.
A: Given: Describe the memory write cycle waveform.
Q: what are the benefits associated with high broadband access connections? What do users like most…
A: Introduction: Fast download rates and the availability of massive amounts of data are the primary…
this is my code but it does not match the sample code please help
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
- package movie;import java.util.Scanner; public class Movie{private String name;private double rating;Scanner sc=new Scanner(System.in);public void setMovieName(String str){name=str;}public void setMovieRating(double rat){rating=rat;}public String getMoviename(){return name;}public double getMovieRating(){return rating;}} class TestMovie{public static void main (String[] args) {Movie m1=new Movie();Movie m2=new Movie();Movie m3=new Movie();m1.setMovieName("Transformers");m1.setMovieRating(3.4);m2.setMovieName("Aliens");m2.setMovieRating(4.5);m3.setMovieName("Hellboy");m3.setMovieRating(4.0);System.out.println("\nMovie name: "+m1.getMoviename()+"\nMovie rating: "+m1.getMovieRating());System.out.println("\nMovie name: "+m2.getMoviename()+"\nMovie rating: "+m2.getMovieRating());System.out.println("\nMovie name: "+m3.getMoviename()+"\nMovie rating: "+m3.getMovieRating());}} what is wrong with my code I need help pls make it in the correct format and explain what is wrong with itFix this program import java.util.Scanner; public class main { public static void WeShipItBad(String[] args) { int OVERNIGHT_CHARGE = 5; int TWO_DAY_CHARGE = 2; int ECONOMY_CHARGE = 1; Scanner console = new Scanner(System.in); // Scanner object to pass around. // Get item description. String itemDescription = getItemDescription(console); if (itemDescription.equals("")) { System.out.println("Invalid description."); } shipWeight = getShipWeight(scnr); if (shipWeight <= 0.0) { System.out.println(); System.out.println("Invalid weight."); } char shipMethod = getShipMethod(council); shipMethod = Character.toUpperCase(shipMethod); double shipCost = calculateShip(shipWeight, shipMethod); displayResults(itemDescription, shipCost, shipMethod, shipWeight); } public static void getItemDescription(Scanner console) { System.out.println("Enter item description:"); String description =…import java.util.Scanner; public class WinningTeam { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); Team team = new Team(); String name = scnr.next(); int wins = scnr.nextInt(); int losses = scnr.nextInt(); team.setName(name); team.setWins(wins); team.setLosses(losses); team.printStanding(); }}
- class Param3 { public int x; private void increase(int p) { x = x*p; } public void calculateX(int y) { increase(y); } public int getX() { return x; } } // in another class Param3 q3 = new Param3(); q3.x = 5; q3.calculateX(7); System.out.println(q3.getX()); what would be the answer for the last two lines ? also above were x = x*p do both x in here are the fields? wouldn't that be cnofusing?import java.util.Scanner; public class WinningTeam { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); Team team = new Team(); String name = scnr.next(); int wins = scnr.nextInt(); int losses = scnr.nextInt(); team.setName(name); team.setWins(wins); team.setLosses(losses); team.printStanding(); }} This is the second part of the program and not geting it to run public class Team { // TODO: Declare private fields - name, wins, losses private String name; private int wins; private int losses; public int getlosses(){ return losses; } // TODO: Define mutator methods - // setName(), setWins(), setLosses() public String setName(){//String name int wins int losses return name; } public int setWins(){ return wins; } public int setLosses(){ return losses; } // TODO: Define accessor methods - //…import java.util.Arrays; import java.util.Scanner; public class Game { private Player[] players; private Board board; private int currentPlayerIndex; private int numOfPlayers; private Scanner scanner = new Scanner(System.in); // constructor public Game(){ //create a new board; this.board = new Board(); //setup game; this.setupGame(); //start game; this.play(); } //Game Setup public void setupGame(){ System.out.println("How many players would you like to included in this game? (2-4)"); numOfPlayers = scanner.nextInt(); while (numOfPlayers < 2 || numOfPlayers > 4) { System.out.println("Invalid input. Please enter a number between 2 and 4."); numOfPlayers = scanner.nextInt(); } scanner.nextLine(); String[] playerNames = new String[numOfPlayers]; this.players = new…
- import java.util.Scanner; public class Shady RestRoom 2 { // Modify the code below public static void main (String args[]) { int selection; int price; String result; final int QUEEN = 1, KING = 2, SUITE = 3; final int QPRICE = 125, KPRICE = 139, SPRICE = 165; final String QSTRING = "Queen bed", KSTRING = "King bed"; SSTRING = "Suite with a king bed and pull-out couch"; INVALIDSTRING = "an invalid option"; Scanner in = new Scanner(System.in); System.out.println("\t\n\nMenu\n"); System.out.println("(" + QUEEN + ") " + QSTRING); System.out.println("(" + KING + ") " + KSTRING); System.out.println("(" + SUITE + ") " + SSTRING); System.out.print("Enter Selection (1, 2, or 3) >> "); selection = in.nextInt(); if(selection == QUEEN) { result = QSTRING; price = QPRICE; } else if(selection == KING) { result = KSTRING; price = KPRICE; } else if (selection == SUITE) { result = SSTRING; price = SPRICE; } else { result = INVALIDSTRING; price = 0; } System.out.println("You selected " + result +…public class Driver { /** * @param args */ static Scanner keyboard = new Scanner(System.in); publicstaticvoid main(String[] args) { Mailbox[] mailboxes = new Mailbox[5]; Mailbox mailbox1 = new Mailbox("gmail"); Mailbox mailbox2 = new Mailbox("outlook"); Mailbox mailbox3 = new Mailbox("icloud"); mailboxes[0] = mailbox1; mailboxes[1] = mailbox2; mailboxes[2] = mailbox3; Email email1 = new Email(); email1.setDate(new Date(2022, 11, 5)); email1.setSubject("Exam2 guidelines "); Email email2 = new Email(new Date(2021, 3, 5), true, "Quiz3 in Ch7"); Email email3 = new Email(); email3.setDate(new Date(2020, 11, 3)); email3.setSubject("Late submission policy"); mailbox2.addEmail(email1); mailbox2.addEmail(email2); mailbox2.addEmail(email3); // System.out.println("Hello! What would you like to do "); intselection = displayMenu(); while (selection != 5) { // selection = displayMenu(); switch (selection) { case 1: System.out.print("Enter the client: "); String…Code example 2-1import java.util.Scanner;public class InvoiceApp {public static void main(String[] args) {Scanner sc = new Scanner(System.in);String choice = “y”;While (choice.equals(“y”)) {System.out.print("Enter subtotal: ");double subtotal = sc.nextDouble();double salesTax = subtotal * .0875;double invoiceTotal = subtotal + salesTax;String message = “Subtotal = ” + subtotal + “\n”+ “ Sales tax = ” + salesTax + “\n”+ “Invoice total = ” + invoiceTotal + “\n\n”System.out.println(message);System.out.print(“Continue? Enter y or n: ”);Choice = sc.next();}}}38. (Refer to code example 2-1.) If the user enters “Y” when asked if he/she wants to continue, the application will a. repeat the while loop b. display a blank line, then repeat the while loop c. End
- Code example 2-1import java.util.Scanner;public class InvoiceApp {public static void main(String[] args) {Scanner sc = new Scanner(System.in);String choice = “y”;While (choice.equals(“y”)) {System.out.print("Enter subtotal: ");double subtotal = sc.nextDouble();double salesTax = subtotal * .0875;double invoiceTotal = subtotal + salesTax;String message = “Subtotal = ” + subtotal + “\n”+ “ Sales tax = ” + salesTax + “\n”+ “Invoice total = ” + invoiceTotal + “\n\n”System.out.println(message);System.out.print(“Continue? Enter y or n: ”);Choice = sc.next();}}} (Refer to code example 2-1.) If the user enters 100 the first time the while loop is executed, what will the program display at the console? a. Subtotal: 100.0 Sales tax: 8.75 Invoice total: 108.75 b. Subtotal = 100.0 Sales tax = 8.75 Invoice total = 108.75 c. Subtotal = 100.0 Sales tax = 8.75Invoice total = 108.75 d. Subtotal = 100.0 Sales tax = 8.75Invoice total = 108.75import 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 class test{ private static final int MAX = 100; private int[] sco; public test(int[] sco){ this.sco = sco; } private int comAvg() throws IllegalArgumentException{ int sum = 0; for (int i = 0; i < sco.length; i++){ int sc = sco[i]; if (sc < 0 || sc > MAX){ throw new IllegalArgumentException("Score (" + sc + ") is not in the range 0-" + MAX); } sum += sco[i]; } int av = sum / sco.length; return av; } public static void main(String[] args){ test test = new test(new int[] { 50, 70, 81 }); try{ int avgSc = test.comAvg(); char letG; if (avgSc < 60) letG = 'F'; else if (avgSc < 70) letG = 'D'; else if (avgSc < 80) letG = 'C'; else if (avgSc < 90) letG = 'B'; else letG = 'A'; System.out.println("\nAVG Score is " +…