IN JAVA Create a function that takes a string and returns the number of alphanumeric characters that occur more than once. Examples duplicate Count ("abcde") → 0 duplicate Count ("aabbcde") - 2 duplicateCount ("Indivisibilities") → 2 duplicateCount ("Aa") 0 // Case sensitive
Q: What enhancements would you make to the current safety and security provided by Windows OS?
A: The question is how to make the Windows operating system more secure.
Q: Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy…
A: Given: There is a transfer of packets taking place between two clients present in a network, i.e.,…
Q: Suppose there is exactly one packet switch between a sending host and a receiving host. The…
A: In any data transmission process, the end-to-end delay refers to the total time spent for…
Q: Rewrite the following statements using augmented assignment operators. a.x=x+1 b.x=x*2 C. X=X/10…
A: Augmented assignment operators are the operators which are generally used to replace a statement…
Q: Remove all errors from the C++ program given below asap. #include using namespace std; int main(){ }…
A: Given C++ program is, #include <iostream>using namespace std;int main() { int…
Q: Use C++ Comment Lines: - Name of the cpp file - Your name - Why you are doing this program Input -…
A: As per the requirement program is developed. Algorithm: Step 1: Write the main method Step 2:…
Q: Question 6 a) The IEEE Standard 754 representation of a floating point number is given as:…
A: We need to a. Find binary of given float. b. Convert from binary 2 complement to decimal. c.…
Q: Assume class MyStack implements the following StackGen interface. For this question, make no…
A: According to the question, we have to write a program code for class MyStack implements the given…
Q: We said that a network layer's service model "defines the characteristics of end-to-end transport of…
A: According to the information given:- We have to define the the characteristics of end-to-end…
Q: Write a function in python, cannot use isalpha or .get named count_letters that takes as a parameter…
A: I give the code in Python along with output and code screenshot
Q: Using Java: Write the following method that returns the maximum value in an ArrayList of integers.…
A: Write the following method that returns the maximum value in an ArrayList of integers. The method…
Q: Given a letter, created a function which returns the nearest vowel to the letter. If two vowels are…
A: Algorithm - Take one string as input. Now use the below logic const char =…
Q: What advantage does a circuit-switched network have over a packet-switched network? What advantages…
A:
Q: Each of these three write One paragraph of INTRODUCTION of Computing Department Knowledge Management…
A: Given: Dear student we need to explain about Computing Department Knowledge Management System. The…
Q: Skype offers a service that allows you to make a phone call from a PC to an ordinary phone. This…
A: The answer of the question is given below:
Q: What are the advantages of using a compiled language over an interpreted language? In which…
A: Compiled and Interpreted Language A computer software called a compiler is created to transform…
Q: Instruction: Create a java program that generates elements (randomly from 10-75) of a 2-dimensional…
A: Logic :- (I) To generate random number in range:- arr[i][j]= Min + (int)(Math.random() * ((Max -…
Q: 1C. Consider the grammar E → TE' E' → + TE' | E T→FT' T'→ *FT' | E F→ (E) | digit For the given…
A: According to the information given:- We have to define the mentioned grammar with the expression to…
Q: What problems do you think might arise in extreme programming teams where many management decisions…
A: What problems do you think might arise in extreme programming teams where many management decisions…
Q: Write a python program to find the potentia energy using the total energy & kinetic energy. All the…
A: I have mentioned answer in below Description : Total energy=potential energy + kinetic energy…
Q: Create a function that takes in a sentence as input and returns the most common last vowel in the…
A: function commonLastVowel(str) { const wordsReverse = []; let wordsArr = str.split(' '); for(i=0;…
Q: Write a program that asks for the names of three runners and the time it took each of them to finish…
A: There is no specific language is asked in the problem. So i am using python language to solve the…
Q: Draw the Resource Allocation Graph from the above given data. From the Resource Allocation Graph you…
A: Answer: As given P = {P1, P2, P3, P4, P5}R = {R1, R2, R3, R4}E = (P3 R1, P2 R2, R4 P4, R2 P1, P5 R3,…
Q: th The following algorithms were given in Week 6 for computing the nº power of a positive integer a.…
A: Use induction to prove the algorithm: Proof by induction is a technique that can demonstrate that an…
Q: Having trouble when I run this python program. I'm being told that the "Test Failed: 'Employee'…
A: Python: Python is a general purpose high level programming language. It uses indentation instead of…
Q: Write a program in the Python language to find the sum of all natural numbers in the range n to 150…
A: Requirement: Write a program in the Python language to find the sum of all natural numbers in the…
Q: When the MPU starts up for the first time it goes to the Reset vector Interrupt vector General…
A: answer is
Q: 1C. Consider the grammar ETE' E' → + TE' | E T→FT' T'→ *FT' | E F→ (E) | digit For the given…
A: Here in this question we have given a grammer and we have asked to draw annotated parse tree for…
Q: Apply your knowledge about arrays and functions and write a program, which takes a positive intege N…
A: ANSWER:-
Q: Implement the following Racket functions: Symmetric-Closure Input: a list of pairs, L.…
A: The code is below, it uses Symm-helper function and opp function.
Q: Why do we utilise MATLAB to solve difficulties in Computational Geometry?
A: Introduction: In business and academia, MATLAB is used by millions of engineers and scientists for…
Q: Show IP EIGRP topology P 4.4.4.0/24, 1 successors, FD is 158720 FD is the feasible distance to reach…
A: Situation: You and a partner network director were discussing the versatility and fluttering network…
Q: IN JAVA SCRIPT Create a function whose argument is the time in 12 hour format (hh:mm:ss). The…
A: In this problem, we need to design a function, which will take time as input in hh:mm:ss format.…
Q: What is NOT a purpose for an operating system? a. To power a computer b. To use computer resources…
A: Introduction An operating system (OS) is the program that in the wake of being first stacked into…
Q: IN JAVA SCRIPT Given an input string, reverse the string word by word, the first word will be the…
A: Algorithm - Create a method calculateScores with one string as argument. Now use the below logic…
Q: 1. One of the advantages of a Hadoop implementation is that it provides a high level of computing…
A: 1. → Hadoop : - Hadoop is a Java based, open source software framework that is used for distributed…
Q: Assume an 8088 is executing a program in which the probability of a program jump is 0.1. For…
A:
Q: WHat would be the code using just the Tkinter import to create a simple survey with the question…
A: Program plan: Import Tkinter module. Create a question "the statue was a work of art". Create five…
Q: Code of ethics addresses specific ethical and professional conduct of the highest degree of which…
A: ACM Code of Ethics and Professional Conduct Prelude Processing experts' activities impact the world.…
Q: How can you aid in preventing internal and external threats?
A: What is threat ? A threat is nothing but a suspicious or malicious activity they can damage the…
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: please check the solution below
Q: Given the shortest side of a 30° by 60° by 90° triangle, find out the other two sides. Return the…
A: In this problem, we need to design the JAVA program. Input - one argument Output - side lengths
Q: Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy…
A: In order to answer the issue, one must conduct a thorough study of the bare minimum criteria…
Q: How does the NAT router differentiate two simultaneous connections which are initiated from PC1 to…
A: INTRODUCTION In this question we are asked how does the NAT router differentiate two simultaneous…
Q: void test() { int i; int a[5]; void f(int x) { a[i] = 4 i=i+1; i = 2 * x; } i = 2; a[1] = 6; a[2] =…
A: Answer:
Q: write some info regarding to IT infrastructure and systems in place for Computing Department…
A: Answer : IT infrastructure should be design computing friendly environment so that it can be easily…
Q: 2. (a) (b) (c) Write the commands for each of the following operations: Create a row vector x of 5…
A: The package NumPy is the package for scientific computing in python programming.
Q: What will be the output of the given program: class A { } int m=20, n=30; void display() {…
A: Problem Analysis: The problem is based on the basics of inheritance in java programming language.
Q: Given the shortest side of a 30° by 60° by 90° triangle, find out the other two sides. Return the…
A: Algorithm - Create a method with one integer as an argument. Now use the below logic return new…
Q: Inter-Process Communication (IPC) is very significant to the design process for microkernels and…
A: Process need to communicate with each other to carry out different operations .This is termed as…
Step by step
Solved in 2 steps with 1 images
- Write and test a function to meet this specification.drawFace (center, size, win) center is a Point, size is an int, andwin is a GraphWin. Draws a simple face of the given size in win.Your function can draw a simple smiley (or grim) face. Demonstrate thefunction by writing a program that draws several faces of varying size in asingle window.Implement the FindText() function, which has two strings as parameters. The first parameter is the text to be found in the user provided sample text, and the second parameter is the user provided sample text. The function returns the number of instances a word or phrase is found in the string. In the PrintMenu() function, prompt the user for a word or phrase to be found and then call FindText() in the PrintMenu() function. Before the prompt, call cin.ignore() to allow the user to input a new string.Ex: Enter a word or phrase to be found: more "more" instances: 5Write an application that reads a five-letter word from the user and produces every possible three-letter string that can be derived from the letters of that word. For example, the three-letter words produced from the word “bathe” include “ate,” “bat,” “bet,” “tab,” “hat,” “the” and “tea.”
- In Java Add the following to the package below: 1.for or for...each or while loops. 2.Arrays 3.default, no-args and parameterized constructors. int numberOfPhotos; // photos on rolldouble fStop; // light let it 1.4,2.0,2.8 ... 16.0int iso; // sensativity to light 100,200, 600int filterNumber; // 1-6String subjectMatter;String color; // black and white or colorString location;boolean isblurry;public String looksBlurry(boolean key) {if (key == true) {return "Photo is Blurry";} else {return "Photo is Clear";}}public void printPhotoDetails(String s1) {Scanner br = new Scanner(System.in);String subjectMatter = s1;System.out.println("Data of Nature photos:");System.out.println("Enter number of photos:");numberOfPhotos = br.nextInt();int i = 1;while (true) {System.out.println("Enter Filter number of photos" + i + ":");filterNumber = br.nextInt();System.out.println("Enter colour of photo" + i + ":");String color = br.next();System.out.println("Enter focal length of photo"…In java can you help with parts that are missing Email- date: Date- subject: String- urgent: boolean+ Email(date:Date,urgent:boolean,subject:String)+ getDate(): Date+ setDate(date: Date): void+ getSubject(): String+ setSubject(subject:String): void+ isUrgent(): boolean+ setUrgent(urgent: boolean): void+ toString(): String public class Email { private Date date; private String subject; privatebooleanurgent; public Email() { } public Email(Date date, booleanurgent, String subject) { this.date = date; this.urgent = urgent; this.subject = subject; } public Date getDate() { returndate; } publicvoid setDate(Date date) { this.date = date; } public String getSubject() { returnsubject; } publicvoid setSubject(String subject) { this.subject = subject; } publicboolean isUrgent() { returnurgent; } publicvoid setUrgent(booleanurgent) { this.urgent = urgent; } @Override public String toString() { return"Email [date=" + date + ", subject=" + subject + ", urgent=" + urgent +…Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters. Letters are case sensitive, for example, "Aa" is not considered a palindrome here. Constraints: 1 <= s.length <= 2000 s consists of lowercase and/or uppercase English letters only. Function definition for Java: public int longestPalindrome(String s) { } Function definition for Python: def longestPalindrome(self, s): #Your code here Announced Test Cases: Example 1: Input: s = "abccccdd" Output: 7 Explanation: One longest palindrome that can be built is "dccaccd", whose length is 7. Example 2: Input: s = "speediskey"Output: 5Explanation: The longest palindrome that can be built is "seees", whose length is 5.
- Write a JavaScript function that accepts a number from a user as input and checks if the number is prime, then print True if the number is not a prime, print False. Note: A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.Define class StringCheck with required instance variables 2) The StringCheck class should have six methods to do the below functions. I. Check if the user entered string is a s imple sentence? ( Starts with capital letter, Ends with period, space between words). II. Check if the user entered string is a q uestion? (Check if the string starts with a c apital letter, ends with a question mark, space between words) - III. Check if the user entered string have numbers in it ? - IV. Check if string is a valid email . – V. Check if the user entered strings ( two separate string s)Define class StringCheck with required instance variables 2) The StringCheck class should have six methods to do the below functions. I. Check if the user entered string is a s imple sentence? ( Starts with capital letter, Ends with period, space between words). II. Check if the user entered string is a q uestion? (Check if the string starts with a c apital letter, ends with a question mark, space between words) - III. Check if the user entered string have numbers in it ? - IV. Check if string is a valid email . – V. Check if the user entered strings ( two separate string s) are same? – VI. A method to check if the user entered character is present in the user entered string. Add a second constructor to initialize string and character when object is created. – 3) Comment all the parameters used using @param and return value using @return before each method, to explain the parameters passed and the return value . 4) Write a Main class with the main function to accept string/s from the…
- When testing this java program I get a java.lang.NullPointerException for 3 sections of the function, specifically String remove, String reverse and String filterLettersIn JAVA A function foo takes three integers as input arguments, i.e., foo(int a, int b, int c). The three inputs represent the three sides of a triangle in centimeter. The function is expected to return the type of a triangle: “equilateral”, “isosceles”, or “scalene”. Assume the domains of the three variables are 1 ≤ a ≤ 100, 50 ≤ b ≤ 150 and 100 ≤ c ≤ 200, respectively. A test case is in a tuple format <a, b, c, expected_output> with test inputs and the expected output. S1 is a set of test cases for the “Boundary Value Analysis” approach. S1 = S2 is a set of test cases for the “Robustness testing” approach. S2 – S1 = S3 is a set of tests cases for the “Robust Worst-Case testing” approach. Are there any types of triangles that S3 cannot reveal? If yes, what are they? If no, why?Write a program that does two string functions: capitalize the first word of a phrase, and reverse the letters of words in odd positions within the phrase. For this program it is acceptable to let punctuation be part of the word. Write a capitalizeWords() and a reverseOddWords() method and call them in a test program. Make certain to properly handle empty phrases, phrases with one and two words, and phrases with greater than two words. For example, if the original phrase were: Learning Java is fun! Java is powerful and easy to use The capitalized version would be: Learning Java Is Fun! Java Is Powerful And Easy To Use And with reversed odd words would be: gninraeL Java sI Fun! avaJ Is lufrewoP And ysaE To esU