Hello given this Java Program: (can you please do 1 and 2) 1-What is the output if user enters 2 when being asked to input? 2- What has user entered if the output is “This is my Ad on April 23rd of 2020”.
Q: I would appreciate it if you could provide three solid reasons why the spiral model is preferable…
A: Software development is a complex and iterative process that requires careful planning, execution,…
Q: When discussing processes that fall beyond the purview of systems analysis, you may find that use…
A: Structured English is a method of expressing ideas in a clear, concise, and unambiguous way using…
Q: In what ways is your database protected from unauthorised access? How can you ensure the safety of…
A: Protecting a database from unauthorized access is crucial to maintain data security and…
Q: Problem 1 Let L be the language over the alphabet Σ = {a, b, c, g} that consists of exactly those…
A: L is the language over {a,b,c,g} with following conditions a)the string is a concatenation of zero…
Q: What do you specifically mean when you say "authentication objectives"? Analyse the different…
A: Information security must include authentication. It tries to verify the legitimacy of the systems…
Q: Could you perhaps explain what you mean by "Supervisor Mode"?
A: Supervisor mode, also known as kernel mode in computer architecture, is a privileged execution mode…
Q: It's possible that some of the tools and strategies that were used throughout the process of…
A: The process of developing a system involves various tools and strategies to ensure that the system…
Q: In Java What does this code print? String easyMath = "sum = " + '2' + '3';…
A: Start the program. Create a string variable named easyMath and initialize it with the value "sum =…
Q: How does a Circular Queue data structure work, and what are its advantages and disadvantages…
A: Circular Queue is a linear data structure that follows a First-In-First-Out (FIFO) order of…
Q: When we do a search using Google, the search engine quickly returns millions of websites that are…
A: Google's search algorithm is a intricate system that processes vast amounts of data to plan users…
Q: Marketing copywriters utilize shaky Windows 10 computers. The copywriter gets an error while opening…
A: Firstly, it's important to make sure that any important files are backed up regularly to prevent…
Q: f your database loses referential integrity, what happens? What errors are common?
A: Referential integrity is a concept in database management that ensures the consistency and accuracy…
Q: When Windows starts up, just where are the settings that are referred to as the "Last Known Good"…
A: When a system-level fault or important issue arises as booting, the window operating system's "Last…
Q: How are the needs of a system distinct from those of a user, and what is the nature of the…
A: While designing a computer system, taking into account both the needs of the system and the needs of…
Q: Throughout its history, describe how the Internet has evolved, and then identify the many…
A: Since its inception, the Internet has seen significant development, expanding from a small worldwide…
Q: Is it necessary to provide explanations or summaries of the most significant phases in the process…
A: It is essential to explain and summarize the most significant phases in the system development…
Q: Is current research on cybercrime important?
A: Yes, current research on cybercrime is extremely important, for several reasons: Growing threat:…
Q: Describe what a challenge-response authentication mechanism is and how it works so that I may get…
A: A challenge-response authentication mechanism is a method used to verify the identity of a user or…
Q: Because of their fundamental design, wireless networks are susceptible to a wide variety of…
A: The answer is given in the below step
Q: Please use Dynamic programming method to find the possible Longest Common Sub- sequence(LCS) from…
A: Answer 1 :Therefore, the LCS between the strings "Prosperity" and "Properties" is "Propero".…
Q: Research options for a solution and share your findings with the class in a minimum of 175 words.…
A: Research options for a solution and share your findings with the class in a minimum of 175 words.
Q: What are the advantages of utilising websites for healthcare purposes? What
A: In the modern era of technology, websites have become an essential tool for various sectors,…
Q: The following are some examples of different software versions, releases, and baselines.
A: Software development is a continuous process that involves creating, testing, and releasing new…
Q: Service operations' queuing model? Are there a lot of different ways that the service system may be…
A: Queuing models are widely used in service operations to analyze and optimize the flow of customers…
Q: When did the Internet of Things first become available, and what are some of the ways that it is now…
A: IoT was initially conceptualized in the late 1990s, and British manufacturer Kevin Ashton is…
Q: In Java Assume all necessary imports have been made, an appropriate plotSegment method has been…
A: Here, our task is to find the problem with the given code fragment and correct it. By analysing the…
Q: Does "many processes" imply the same thing as "many threads" or does it indicate something else…
A: When someone refers to "many processes," they are generally talking about a system that is running…
Q: "Several processes"-can you explain? Could you put it in simpler terms?
A: Sure, I can explain "several processes" in simpler terms. In computing, a process is an instance of…
Q: What are the advantages of outsourcing information technology that are often cited?
A: Hiring the party outside which means an outsource services provider to perform services such as…
Q: [2] Simplify the following Boolean functions, using four-variable maps: F (w, x, y, z) = (1,4,5,6,…
A: (a) The four-variable map for F(w, x, y, z) is: z wxyz 00 01 11 10 000 |0 0 0 0| 001 |0…
Q: What steps are being taken to construct this infrastructure for connected devices?
A: The rise of the Internet of Things (IoT) has resulted in the need for a vast infrastructure of…
Q: Consider making WPA2 the default wireless security protocol for your network. Please explain why…
A: When it comes to securing wireless networks, choosing the right security protocol is crucial to…
Q: produce a programme in C++ that will read an integer number, check to see whether it is positive or…
A: 1) Below is Programme in C++ that will read an integer number, check to see whether it is positive…
Q: Which kind of bus should we use to connect the central processing unit (CPU) and the memory in our…
A: Which kind of bus should we use to connect the central processing unit (CPU) and the memory in our…
Q: The con
A: The construction of software is a complex process that requires careful planning and design. The…
Q: This assignment will continue with the user class you created in your last assignment. Write a class…
A: Start. Define the User class with the init, describe_user, greet_user, and new_login methods. Define…
Q: How many SQL queries change the structure of the table? Which significant alterations must to be…
A: The answer is given below
Q: Please provide three convincing arguments as to why the spiral model is preferable than the…
A: The Spiral Model is an iterative and risk-driven software development process model that combines…
Q: Which Microsoft Office product should be acquired for your work office (let's suppose it's a…
A: Microsoft Office is a desktop productivity package. Programs created by Microsoft for use in…
Q: Could you please provide an example of how the process of waiting in the line works?
A: Certainly! Let's consider an example of how the process of waiting in a line, such as a queue,…
Q: Which design pattern is best for software that makes and uses data? Write code or describe the…
A: Design patterns are reusable solutions to common problems that occur in software design. When…
Q: Which of the following graphs have Euler circuits? L E G K M D C H I A: Has Euler circuit. I B 0 N…
A: Euler circuit : is a path that starts and ends at same vertex and visits every edge in the graph…
Q: The construction of software is done in accordance with a plan. Discuss the influence that different…
A: Software architecture is a crucial features of software engineering, crucial the arrangement taken…
Q: What are the repercussions of an attack on the referential integrity of a database? What kinds of…
A: Regarding relational databases, referential integrity is a crucial idea. It is a Compilation of…
Q: QUESTION 5 35 A convolutional circuit has three internal registers (S0, S1, and s2), and two outputs…
A: Answer: First option c0=0; c1=0; next=011 Explanation: Current state is 110, which means s0=1,…
Q: Programme in C++. Create any two classes and conduct inheritance by adding 3 data members to parent…
A: The answer is given below
Q: 06 A convolutional circuit has three internal registers (S0, S1, and s2), and two outputs (CO and…
A: This question presents a convolutional circuit with three internal registers and two outputs. The…
Q: Which problems with the router's layer 2 protocol have been discovered? What are the implications of…
A: Layer 2 protocols, also proven as data link layer protocols, are fundamental for establishing…
Q: Can you explain NoSQL BASE transaction support?
A: NoSQL databases have become increasingly popular due to their ability to handle large amounts of…
Q: The original dataset shown below contains information on percentile score for end of grade exams in…
A: A dataset is a collection of data, usually organized in a tabular format, that represents…
Step by step
Solved in 3 steps with 3 images
- public class TestAverage {public static void main(String[] args) {int test1, test2, test3, sum;Scanner reader = new Scanner(System.in);System.out.println("Enter test 1");test1 = reader.nextInt();System.out.println("Enter test 2");test2 = reader.nextInt();System.out.println("Enter test 3");test3 = reader.nextInt();sum = test1 + test2 + test3;System.out.println("The sum is " + sum);System.out.println("The average is " + sum / 3);}}There is one logic error in this code explain what is wrong and how to fix it.public class ReversedDigit { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Please enter a number: "); int number = scan.nextInt(); int reversedNumber = 0; do { reversedNumber = number%10; number = number/10; } while (number > 0); }} Modify the coding example, to count what is the total of all digits of a number. For example, when user enters 301, your output is 4 because 3+0+1=4; when user enters 5116, your output is 13 (5+1+1+6 = 13).import java.util.Scanner; public class CharMatch { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String userString; char charToFind; int strIndex; userString = scnr.nextLine(); charToFind = scnr.next().charAt(0); strIndex = scnr.nextInt(); /* Your code goes here */ }}
- This isn't not working for me. import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int userNum = in.nextInt(); int divNum = in.nextInt(); System.out.print("What is the user number?"); userNum = scnr.nextInt(); int a, b, c; a = userNum/divNum; System.out.println(a); b = a/divNum; System.out.println(b); c = b/divNum; System.out.println(c); }} ERROR LabProgram.java:6: error: cannot find symbol int userNum = in.nextInt(); ^ symbol: variable in location: class LabProgram LabProgram.java:7: error: cannot find symbol int divNum = in.nextInt(); ^ symbol: variable in location: class LabProgram 2 errorsimport java.util.Scanner; public class leapYearLab { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int userYear; boolean LeapYear; System.out.println("Enter the year"); userYear = scnr.nextInt(); isLeapYear(userYear); //if leap year if (isLeapYear){ System.out.println(userYear + " - leap year"); } else{ System.out.println(userYear + " - not a leap year"); } scnr.close(); } public static boolean isLeapYear(int userYear){ boolean LeapYear; /* Type your code here. */ if ( userYear % 4 == 0) { // checking if year is divisible by 100 if ( userYear % 100 == 0) { // checking if year is divisible by 400 // then it is a leap year if ( userYear % 400 == 0) LeapYear = true; else LeapYear = false; } // if the year is not divisible by 100 else…import java.util.Scanner; public class MealEstablishmentDirectory { public static void main (String[] args) { Scanner scnr = new Scanner(System.in); int newRating; String newState; MealEstablishment mealEstablishment1 = new MealEstablishment(); System.out.println("Default values: "); mealEstablishment1.print(); newRating = scnr.nextInt(); newState = scnr.next(); mealEstablishment1.setRating(newRating); mealEstablishment1.setState(newState); System.out.println("After mutator methods: "); mealEstablishment1.print(); } }
- import java.util.Scanner; public class DebugSix3 { public static final int TIME_WASTER = 500; public static void main(String[] args) throws InterruptedException { Scanner input = new Scanner(System.in); System.out.print("Enter a number between 1 and 20 >> "); int num = input.nextInt(); if (num < 1 || num > 20) { System.out.println("Number out of range!"); return; } for (int i = num; i > 0; i--) { System.out.print(i + " "); Thread.sleep(TIME_WASTER); } System.out.println("Blastoff!"); } } The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. An example of the program is shown below: Enter a number between 1 and 20 >> 5 5 4 3 2 1 Blastoff! Depending on the value assigned to the…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. EndCode 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.75
- import java.util.Scanner; public class OutputWithVars { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int userNum; int userA; int userB; System.out.println("Enter integer:"); userNum = scnr.nextInt(); userA = userNum * userNum; userB = userNum * userNum * userNum; System.out.printf("You have entered %d", userNum); System.out.printf("\n%d squared is %d", userNum, userA); System.out.printf("\nAnd %d cubed is %d", userNum, userB); System.out.println("\nEnter another integer:"); int user = scnr.nextInt(); System.out.printf("%d", user) Purpose: I am trying to stop and let the user input another value but my result is Enter integer: You have entered 2 2 squared is 4 And 2 cubed is 8 Enter another integer: meaning my first part worked but... Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.Scanner.throwFor(Scanner.java:937) at…import java.util.Scanner; public class StateInfo { /* Your code goes here */ public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String stateCode; String stateName; stateCode = scnr.next(); stateName = scnr.next(); printStateInfo(stateCode, stateName); }}import 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:…