Write a Java Program to a string from user, does "abc" appear in the middle of the string? To define middle, we'll say that the number of chars to the left and right of the "abc" must differ by at most one.
Q: Q3/ Suppose a movie theater has 36 seats, laid out in a rectangular six rows by six seats. Let the…
A: Use if-else to check row and seat and print price accordingly.
Q: It's not clear whether Assembly Language is a universal programming language.
A: Portability: By and large, all high-level languages provide this capability.
Q: Tools for validators should be specified.
A: validators: A validator is a software that checks the validity or syntactical correctness of a code…
Q: What are the hazards of creating an online library for software engineering, in your opinion?
A: Hazards are the problems and these are occurred in the creation of software engineering. In the…
Q: .. Write a CPP program that reads a line consists of an unknown number of words. The program then…
A:
Q: Consider the following scenario: you'd like a contractor to create a software application equivalent…
A: SOO (statement of objectives): It establishes broad goal that acts as the foundation work…
Q: Explain double precision in a few words.
A: Double precision The term "dual precision" refers to a particular form of floating point integer.
Q: Are there advantages and disadvantages to each type of cryptography? What factors must be addressed…
A: Among the advantages of the symmetric encryption algorithm are the following: Simple: Generally…
Q: Would you agree with the following statement about a P2P file-sharing programme: "There is no idea…
A: Introduction: In this issue, we will talk about the P2P file sharing programme.
Q: only python Your program should ask the user to input a number of family members. The program should…
A: Solution: Code: def ask_for_age(): age = int(input('Enter the age of a family member: '))…
Q: Like GUI or command line? Why?
A: According to the question the command line interface it’s an that interface for user that is used…
Q: What primary InfoSec functions would you recommend for a small organization with three full-time…
A: The InfoSec program is responsible for developing, implementing, and maintaining an information…
Q: Are there any downsides to languages without syntactic ambiguity? If yes, what are they?
A: Given: We have to discuss Are there any downsides to languages without syntactic ambiguity. If…
Q: What exactly is a Firewall?
A: Introduction: A firewall is a network security appliance that monitors and filters incoming and…
Q: What is quantum computing, and how does it work?
A: COMPUTING AT THE QUANTUM LEVEL: Quantum Computing is a kind of computing in which the quantum state…
Q: When it comes to the toolbar and the Toolbox, what is the main distinction?
A: Toolbar: A toolbar is a group of icons or keys that are part of a software program's graphical user…
Q: When it comes to computer architecture, is there a difference between it and computer organization?…
A: A computer is a device that receives data, processes it, and then produces the results. Actually,…
Q: Write a Java program to do the following task: Create an integer array of size 15. Input the values…
A: Your java program is given below as you required with an output.
Q: Explain how the convergence of computers, telecommunications, and media has resulted in the…
A: let us see the answer:- Introduction:- The phrase "technological convergence" refers to the…
Q: In comparison to bespoke software creation, what are the primary benefits of application system…
A: To begin, we will get acquainted with both concepts. 1. Application System Reuse - Assume you have…
Q: In what ways are the UDP and TCP protocols different from one another?
A: Protocols TCP and UDP: TCP (Transmission Control Protocol) is a transport-layer protocol that…
Q: Explain what a normalized finite number is in a few of sentences.
A: Solution:-
Q: Write an application that throws and catches an ArithmeticException when you attempt to take the…
A: Here is the approach : Create double to take input and double to store the square root of the value…
Q: What is a SQL injection attack, and how does it work? Explain how it works and how to avoid SQL…
A: SQL injection attack is an attack which occurs when untrusted user data is sent to the web…
Q: What does efficiency not include in a software product? Explain?
A: Introduction: A software product's efficiency does not include
Q: What is the life expectancy of a variable declared within a Click event handler?
A: Click event handler: When a pointing device button (such as the main mouse button on a mouse) is…
Q: computer science - What exactly is a slug?
A: Introduction: A slug is a unique identifier in a web address. Instead of a less human-readable…
Q: at are some sound business
A: Introduction Today's attacks are usually carried out silently, with malware being delivered by email…
Q: lain cloud computing and the benefits of using it in detail?
A: Cloud Computing : This can be defined as the computing model in which the data on which the…
Q: Determine and evaluate three (3) particular threats or attacks that might be conducted against the…
A: Justification: Malware attacks are popular cyberattacks in which malware (usually malicious…
Q: In order to carry out operations, a computer compares data pieces and then performs predetermined…
A: Introduction: A computer performs programmes that are based on data comparisons and then executes…
Q: What are the primary benefits of the application system reuse method over bespoke software…
A: Establishment: Software reuse refers to the process of creating software frameworks from established…
Q: Most people agree that developing appropriate security policies and putting them into effect on a…
A: Policies Concerning Security: It enables the business to protect its information assets against…
Q: Which phase takes the longest to complete in the data science process?
A: Introduction: A typical data science project might take anything from 2 weeks to 6 months to finish.…
Q: Try to demonstrate mathematically that 3n2+2n+1=O(n2).
A: The definition of O-notation is.... For a given function g(n), we denote O(g(n)) the set of…
Q: explain the effect of AWAY channel on ASK signal.
A: Answer in step 2
Q: What does "reduced" mean in terms of a computer's limited instruction set?
A: Introduction: When compared complicated instruction set computers, the instruction set architecture…
Q: computer science- Why is a transducer a device that changes one sort of signal into another?
A: Introduction: A transducer is a device that converts one type of signal into another.
Q: Define the two-tier and three-tier application architectures. Which one is better for web apps? Why?
A: Application architectures: There are many different kinds of application architectures, but the most…
Q: Four sources of vulnerability intelligence should be identified and described in detail. Which way…
A: Vulnerability intelligence: Cyber threat intelligence is divided into three levels: operational,…
Q: SAP Perl language with output The most common type of scalar is a number or hows how to use several…
A: Below the Perl program with output and where common type of scalar is a number or a string
Q: Explanation of the destiny of a bathtub curve for a microprocessor working in an arctic location, on…
A: Bathtub curve: A bathtub curve is a graphic depiction of a product's or collection of goods'…
Q: What exactly does "virtual memory management" mean?
A: Definition: Virtual memory is a memory management approach that allows secondary memory to be…
Q: VLAN is intended to provide administrative access to netwc
A: Below the VLAN is intended to provide administrative access to network devices
Q: def countdown (n): # what is the conditional statement that sho uld go here to achieve the printout…
A: Option-1) Given Code: When we use option-1 in given code as: def countdown(n): if…
Q: In what circumstances did the RISC architectural concept come to be developed?
A: RISC (Reduced Instruction Set Computer): RISC architectures are a significant advancement in the…
Q: Demonstrate your knowledge of prototyping.
A: Prototyping A prototype is a working representation of an upcoming product concept. Prototyping is…
Q: Although the BCNF method guarantees lossless decomposition, it is conceivable to have a schema and a…
A: Introduction: It is feasible to have a lossless decomposition into 3NF itself instead of BCNF. It is…
Q: Describe how virtual reality could be used to help students study in one of your most difficult…
A: Virtual reality aids pupils in learning one of the most difficult subjects: We know that virtual…
Q: Explain dloud computing and the benefits of using it in detail ??
A: Cloud computing is on-demand access, via the internet, to computing resources—applications, servers…
Step by step
Solved in 4 steps with 2 images
- IN JAVA Write a function that takes in user input as a string. For all characters which are numeric, double its value and, if it is two digits, then replace it with the sum of its digits (e.g., 6 → 12 → 3 whereas 3 → 6). For all characters which are in uppercase, replace it with lowercase. For all characters which are in lowercase, replace it with uppercase (e.g., m → M and N → n). The program should keep asking the user to enter strings until they either enter ‘q’ or ‘Q’.Solve in java Find the index of a string within a hex encoded string. You will be given a string which needs to be found in another string which has previously been translated into hex. You will need to return the first index of the needle within the hex encoded string. Examples firstIndex("68 65 6c 6c 6f 20 77 6f 72 6c 64", "world") → 6 firstIndex("47 6f 6f 64 62 79 65 20 77 6f 72 6c 64", "world") ➡8Code language Java 1, Add a print statement to say “Multiplication Table” and then prompt theuser to enter an integer. Your program should then prints “times table” for thenumbers from 1 to the given integer (inclusive). That is, for input n, you would printa table of n rows (lines) each with n columns, where the cell at row i and columnj contains the value i × j. You do need separate rows, but don’t worry about thecolumns lining up nicely yet. 2. Add a print statement to say “Prime Testing”.Using the integer entered by the user above, print out all the prime numbers between2 and the number squared. E.g., if the user types 12 for the multiplication table part,you should print all the prime numbers that are not larger than 144.All integers are either prime or composite. A prime number is one that has no integerfactors other than itself or one. Examples are 2, 3, 5, 7, 11, 13, . . .. A compositenumber, by contrast, has multiple factors. Examples are 4, 6, 12, 15, 18, 21, . . ..Testing…
- Write a java program that generates random string called str of 10 characters from the English alphabet (lower and upper case) and then find the longest sequence of characters from str that is also a substring in your First Name called matchStr. The program should display: 1) The string str. 2) Your first name 3) The longest sequence matchStr. Note: In Random String str we can have at most two subsequent similar letters (we can have Aa but not AaA or aaa) Example: Suppose the generated random String is "AmedMoXMha" Name is "Mohamed" Output: Str = "Amed MOXMha" Name = "Mohamed" MatchStr = "medWrite a java program that generates random string called str of 10 characters from the English alphabet (lower and upper case) and then find the longest sequence of characters from str that is also a substring in your First Name called matchStr. The program should display: 1) The string str. 2) Your first name 3) The longest sequence matchStr. Note: In Random String str we can have at most two subsequent similar letters (we can have Aa but not AaA or aaa) Example: Suppose the generated random String is “AmedMoXMha” Name is “Mohamed” Output: Str = “AmedMoXMha” Name = “Mohamed” MatchStr = “med”IN JAVA Create a function that takes a string and returns the number of alphanumeric characters that occur more than once. Examples duplicateCount ("abcde") → 0 duplicateCount ("aabbcde") → 2 duplicateCount ("Indivisibilities") → 2 duplicateCount ("Aa") → 0 // Case sensitive
- Write an application in Java which defines String=”hello world”, convert it into character array through function Now calculate number of o’s and display.use java programming make a program that takes in a string. This string will be altered by switching the characters by asking two indices to switch. However, there is a twist. If the index to be switched is a vowel character, find the nearest non-vowel character and switch it instead. If the distance to the left is the same as the riht one, use the right one. Furthermore, finding the nearest non-vowel character is rotational, meaning, if you are at index '0' and the non vowel character and index '1' (right direction) is a vowel character, the new index would be the last index.In Python, The function concatAltChars takes a string parameter s and a boolean parameter even; the function concatenates together either the even-position characters of s or the odd-position characters of s, depending on whether even is True, or False, respectively. The accumulated string is returned. For example, the even-indexed characters of "HANOVER" are at indexes 0, 2, 4, and 6: H N V R. So, concatAltChars("HANOVER", True) returns the string result "HNVR". But concatAltChars("HANOVER", False) returns the string result "AOE". For example: Test Result s = "goldfinches" print(concatAltChars(s, True)) glfnhs s = "A" print(concatAltChars(s, True)) A s = "A" print(concatAltChars(s, False))
- Language: Java Write a program that reads a sentence from the keyboard. Depending on the last character of the sentence, print the message identifying the sentence as declarative (ends with a period), interrogative (ends with a question mark), exclamatory (end with an exclamation point), or other. Hint: you can use charAt() method from the String class to extract the last character of the input line. The character of a String str is at str.length()-1 position. For taking a sentence as input use the nextLine() method from the Scanner class. You have to use if/else if selection. Sample input and output: Sample 1 Input: How are you? Output: Interrogative Sample 2 Input: I am good. Output: Declarative Sample 3 Input: That is amazing! Output: Exclamatory Sample 4 Input: Although, Output: Other Answer:java: Run length coding is a method to represent a string in a more compact manner. Each character that occurs more than 2 times in a row is represented by the character and a number following it. Two examples are: "abba" → "abba""abcccbbbba" → "abc3b4a"Write a function that calculates how many characters the encoded string is shorter than the original.In Python, with use of function and input parsing/ Make a method is_anagram_of(a,b) that tests if a is an anagram of b. A string a is an anagram of a string b, if it uses exactly the same letters, but the order can be different. Spaces are ignored, as well as capitalization. Examples of anagrams: "eleven plus two" - "twelve plus one" "William Shakespeare" - "I am a weakish speller" "Tom Marvolo Riddle" - "I am Lord Voldemort" "Anagrams" - "Ars manga" "television ads" - "enslave idiots" Counter examples: "bla" - "aalb" "cat" - "tact" Hint: Make a dictionary that holds how often a letter occurs in a word.