Subject Name: Object Oriented Programming in Java Answer the following question: • Write a Java code program to produce the odd numbers out of the first 10 numbers. • Write a Java code program to product of 5,10.......50. • Determine the output of the following code: String str="Programming"; for (int i=0; i<9; i+-2) { System.out.print( str.charAt(i)); } • Note: Attached the output shot screen of the execution code.
Q: Do the functions of hardware and software differ significantly?
A: INTRODUCTION: Computer hardware includes the physical components of a computer such as the chassis,…
Q: Where can I get further information on the TOR network?
A: TOR (The Onion Router) network is a decentralized, anonymous network that allows users to access the…
Q: Bv An investigation of the inner workings of the Domain Name System (DNS), including such topics as…
A: Introduction: Because it functions as the Internet's address book, the Domain Name System (DNS) is…
Q: - Write a code fragment that shows a dialogue message said: "Please confirm the delete message.".
A: AlertDialog.Builder builder = new AlertDialog.Builder(context);builder.setMessage("Please confirm…
Q: In the context of computer systems, what are the key differences between hardware and software?
A: Hardware and software are two essential components of computer systems. Hardware refers to the…
Q: step of 0.1. y1 = cos x y2 = cos²x + 0.1 y3 sin x x +7cos x
A: Below given code and explanation to generate a plot of the four functions you provided using MATLAB.
Q: Purpose: Practice with conditionals; practice with variables and good program design. Degree of…
A: Algorithm: Import the tkinter module. Define the GradeModel class with an __init__ method to…
Q: What conditions need subsystems of applications or processes on a large computer system? How might…
A: Introduction: Logical partitions (LPARs) are a technology used in some computer systems to divide a…
Q: Google returns millions of related links in one millisecond?
A: The rate at which electrons may flow is a limiting factor in all contemporary Computer gadget…
Q: Data collection and categorization before database entry are crucial.
A: Introduction: Data collection and categorization are essential processes that precede database…
Q: WITHOUT making a truth table, give truth values to variables p, q, T, 8, and u that make the…
A: Propositional logic: Propositional logic plays an important role in programming, as it provides a…
Q: How do databases acquire data? Can you get a list of each database's contents? How can you fix data…
A: A database is an organized collection of structured data that is stored and managed in a…
Q: The issue is whether kind of program-level parallelism, control or data, works best with SIMD. What…
A: SIMD architecture: A single instruction is executed on multiple data elements in parallel. The data…
Q: I have to make a project for measuring Power Consumption Using Arduino and Simulation also.For power…
A: Here is an example C code for measuring power consumption using Arduino and corresponding Proteus…
Q: How would you decide between using an ODBC/JBDC framework vs an ORM framework when constructing a…
A: ODBC JDBC Open Database Connectivity is the acronym for this. For Java database connection, see…
Q: FTP enables files to be downloaded or uploaded between computers. True False
A: The answer is discussed in the below step
Q: please right professional comments using //command by the end of each line in this c++ code
A:
Q: Each organization should make it second nature to identify a variety of different solutions for the…
A: Data preservation is the process of preserving and upholding the security and consistency of data.…
Q: For the graph below determine the minimum number of colors necessary to color its vertices. Justify…
A: Graph Coloring Graph coloring are the assignment of colors (or labels) to the vertices of the graph…
Q: C Which of the following is true? A) A class can only implement one class A class can extend many…
A: We have been given four option about class We have to explain which option is correct and why and…
Q: Prove or disprove that if f₁ (n) = 2 (9₁ (n)) and f2 (n) = N(92 (n)), then f₁ (n) + f₂ (n) = N (min…
A: Let assume f1(n) = Ω(g1(n)) and f2(n)=Ω(g2(n)) f1(n) >= c1g1(n) and f2(n) >= c2g2(n)
Q: To answer the question, "Why did Cisco go from a stand-alone access control system to an IP…
A: Introduction: In its first implementation, the Cisco Network Admission Control (NAC) function…
Q: Are cloud computing's benefits comparable? What are cloud risks and challenges? Is cloud computing…
A: Cloud computing has a range of benefits that can make it a worthwhile investment for businesses and…
Q: When did cybercrime become so common and complex?
A: A cybercrime is a crime involving a computer or computer network.
Q: Which tactic is used to ensure that legacy systems continue to mature
A: Answer: Introduction: A legacy system is a piece of computing software or hardware that is no longer…
Q: The activity of compiling information from a variety of sources is referred to as "data mining," and…
A: Introduction: Data mining is the process of analyzing and extracting valuable information from large…
Q: c) int i = 1; while (i <5) if ((i + + ) % 2 == 0) Sopln (i);
A: Answer is
Q: Understand social media. What does autonomous computing accomplish in the cloud? All instances show…
A: Introduction: The name "cloud computing" comes from the fact that the information being used is…
Q: A virus that infects an executable file on a computer. What changes should be made to the executable…
A: The acronym VIRUS stands for key information Resources that are now under attack. It is possible…
Q: 1) Do you think it is possible to create another constructor with the same set of parameters? For…
A: In OOP, an object is an instance of a class, which is a blueprint for creating objects. An object…
Q: How do machine learning models make predictions based on input data, and what techniques are…
A: We have to explain how machine learning models make predictions based on input data, and what…
Q: This article describes DNS entries, authoritative and root servers, and iterated and non-iterated…
A: 1) DNS servers translate URLs and domain names into computer-friendly IP addresses. They convert…
Q: How has Google changed us?
A: Overview Answering this topic requires thinking about how Google is changing our world.Please see…
Q: Why do certain individuals find engaging in criminal activity online to be so appealing?
A: Criminal activity refers to anything which does violate the law . This includes the various kind of…
Q: what is the use of mocker in unit test?
A: In the following solution, we are going to understand what is the significance of using mocker in…
Q: a) Fill in the blanks. .data A: .word 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 i: .word 7 B:…
A: Introduction: a)Fill in the blanks..dataA: .word 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24i:…
Q: Which of the following CPU Scheduling algorithms might be susceptible to starvation? Assume burst…
A: The solution is given below for the above given question:
Q: Which of the following state changes does the OS perform on a process?
A: There are two multiple choice questions given, 1. which of the following state changes is a process…
Q: What exactly is the difference between "hardware" and "software" when it comes to computing devices…
A: Computer: A computer is an electronic, programmable device that can assemble, process, and store…
Q: How does research affect cybercrime?
A: Cybercrime is increasing because data and information are essential in the current climate.…
Q: OS ASSEMBLY CODE Using YASM assembly code(x86) .Create a program that accepts two user…
A: Introduction: Create a program that accepts two user inputs. For any input from the two users,…
Q: Read a 5-character long String from input. Then produce a secret String in the following way:…
A: I have done the code in Python along with the output and code screenshots
Q: Database security, then? Two-way database security: how?
A: Database security refers to the safeguarding of sensitive data and the prevention of data loss. The…
Q: Wireless networking difficulties might happen when two stations are visible or when one station is…
A: Yes that's right. In both situations, wireless network problems can occur. If two stations are…
Q: How do databases acquire data? Can you get a list of each database's contents? How can you fix data…
A: Information collection is also known as data gathering or needs gathering.In each database, the data…
Q: List your data databases. How do databases acquire data? Who updates databases? Can I print database…
A: Database: Databases that are accessible from your country may be identified using an internet…
Q: An example of a mobile device
A: Mobile devices are handheld computing devices that allow users to access information, connect with…
Q: Discussing iterative and non-iterative DNS queries, authoritative servers, root servers (if…
A: DNS DNS (Domain Name System) is a hierarchical decentralized naming system that translates the…
Q: DNS discussions should cover iterated and non-iterated queries, root servers, authoritative servers,…
A: DNS queries can be iterated or non-iterated, with iterated queries requesting either the information…
Q: As a researcher, is cybercrime research important?
A: In today's digital age, cybercrime has become an increasingly prevalent and severe menace. With the…
Ans poww.
Step by step
Solved in 6 steps with 2 images
- int func(int a, int b) { return (aInstructions Insurance.java >- Terminal + 1 import java.util.Scanner; sandbox $ 0 2 class Insurance { The Harrison Group Life Insurance company computes public static void main (String args[]) { // Write your code here annual policy premiums based on the age the customer 4 turns in the current calendar year. The premium is } computed by taking the decade of the customer's age, adding 15 to it, and multiplying by 20. 7 public static int calculatePremium(int curr, int birth) { 8 // Write your code here } For example, a 34-year-old would pay $360, which is calculated by adding the decades (3) to 15, and then 10 } 11 multiplying by 20. Write an application that prompts a user for the current year then a birth year. Pass both to a method that calculates and returns the premium amount, and then display the returned amount. An example of the program is shown below: Enter the current year >> 2020 Enter the birth year >> 2001 The premium is $320 Grading Write your Java code in the area on the…In C++ Find the five errors. For each error, state the line number, explain the error and show a correction. #include<iostream> #include<iomanip> using namespace std; class colorCode { public: void setRGB(int); //accepts an int parameter and sets the RGB to the value of the parameter void setName(string);//accepts a string parameter and sets the name of the object to the value of the parameter string getName() const;//returns the name of the object int getRGB() const;//returns the RGB of the object void changeColor();// adds 10 to the RGB value private: string name; int RGB; } int main() { colorCode paintCans[10]; int i; for (i = 0; i < 10; i++){ paintCans.setRGB[i] = 0;} paintCans[5].setName(GREEN); paintCan[5].setRGB(192000); cout << paintCans[5].getName << ' ' << paintCans[5].getRGB() << endl; return 0; }#include<stdio.h> #include<stdarg.h> void fun1(int num, ...); void fun2(int num, ...); int main() { fun1(1, "Apple", "Boys", "Cats", "Dogs"); fun2(2, 12, 13, 14); return 0; } void fun1(int num, ...) { char *str; va_list ptr; va_start(ptr, num); str = va_arg(ptr, char *); printf("%s ", str); } void fun2(int num, ...) { va_list ptr; va_start(ptr, num); num = va_arg(ptr, int); printf("%d", num); }.#include using namespace std; const int y = 1; int main () { int static y = 2; int i = 3, j = 4, m = 5, n = 6; %3D int a = [] (int x, int i = 1) { return x * i; } (y, 3) ; %3D int b = [=] (int x) { return [=] (int b) { return b + j; } (x) % 7; } (a); int c = [=] (int x) mutable ->int { m = 6; return [6] (int j) mutable { y = a * b; return y / j; } (x) -m; } (b) ; cout << a << endl; cout << b << endl; cout << c << endl; cout << m << endl; cout << y < endl; return 0; This program outputs 5 lines. What are they? Please explain your work and your answer.CSCI 2436:01L Data Structures Lab Lab 1 - Chapter 4 The Efficiency of Algorithms In this lab, you will practice how to measure the running time f a section of code in Java. One approach is to use System.nano Time() where the current time is stored as a long integer equals to the number of nanoseconds. By subtracting the starting time in nanoseconds from the ending time in nanoseconds, you get the run time-in nanoseconds of a section of code. public static void main(String[] args) { int n1 = 10, n2 = 100, n3 = 1000, n4 = 10000; long n1Time, n2Time, n3Time, n4Time; n1Time AlgorithmA (nl); For example, suppose that AlgorithmA is the name of a method you wish to time. The following statements will compute the number of nanoseconds that AlgorithmA requires to execute: } public static long AlgorithmA (int n) { long startTime, endTime, elapsedTime; startTime = System.nanoTime (); int sum = 0; for (int i = 1; i 0 1 2. By midnight, Tuesday, Jan 24th, submit your Java source file and a…Void Do1 (int: &, a. int &b) { a = 5; a = a + b; b = a + 2; } Int main() { Int x = 10; Do1 (x,x); Cout << x << endl; } The output of this program isArt.java In this part you will create a program Art.java that produces a recursive drawing of the design attached in the picture. Requirements Art.java must take one (1) integer command-line argument n that controls the depth of recursion. Your drawing must stay within the drawing window when n is between 1 and 7. (The autograder will not test values of n outside of this range.) You may not change the size of the drawing window (but you may change the scale). Do not add sound. Your drawing can be a geometric pattern, a random construction, or anything else that takes advantage of recursive functions. Optionally, you may use the Transform2D library you implemented in Part 1. You may also define additional geometric transforms in Art.java, such as sheer, reflect across the x- or y- axis, or rotate about an arbitrary point (as opposed to the origin). Your program must be organized into at least three separate functions, including main(). All functions except main() must be private. call…//Assignment 06 */public static void main[](String[] args) { String pass= "ICS 111"; System.out.printIn(valPassword(pass));} /* public static boolean valPassword(String password){ if(password.length() > 6) { if(checkPass(password) { return true; } else { return false; } }else System.out.print("Too small"); return false;} public static boolean checkPass (String password){ boolean hasNum=false; boolean hasCap = false; boolean hasLow = false; char c; for(int i = 0; i < password.length(); i++) { c = password.charAt(1); if(Character.isDigit(c)); { hasNum = true; } else if(Character.isUpperCase(c)) { hasCap = true; } else if(Character.isLowerCase(c)) { hasLow = true; } } return true; { return false; } }int f(int &k){k++;return k * 2;}int main(){int i = 1, j = -1;int a, b, c;a = f(i) + i/2;b = j + f(j) + f(j);c = 2 * f(j);return 0;} What are the values of a, b and c id the operands in the expressions are evaluated from left to right and then what are the values when its evaluated right to left?int j; for (int i = 0; i < 5; i++) {j = 2*j*i;} What is j?PLEASE CODE IN PYTHON Problem Description An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other. Input Specifications The input for the program will come from an input file in.dat, in.dat will have two lines of data, line (1) will have the first phrase and the line(2) will have the second phrase. You may assume that the input only contains upper case letters and spaces. Output Specifications The program will print out one of two statements: ”Is an anagram.” or, ”Is not an anagram.” All output will be to the screen. Sample Input CS AT WATERLOO COOL AS WET ART Output for Sample Input Is an anagram.SEE MORE QUESTIONS