Answer:
import java.util.Scanner;
class Main {
public static int calcSeries(int n) {
int sum = 0;
for(int i=10; i>=n; i--) {
sum += i;
}
return sum;
}
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
int n = 0;
do {
System.out.print("Enter n: ");
n = reader.nextInt();
if (n >= 10) {
System.out.println("Please enter a value lower than 10.");
}
} while (n >= 10);
reader.close();
System.out.printf("sum: %d\n", calcSeries(n));
}
}
Insert the missing code in the following code fragment. This fragment is intended to implement a method to set the value stored in an instance variable. public class Employee { private String empID; private boolean hourly; . . . _______ { hourly
Answer:
public boolean getHourly()
Explanation:
Question 1(Multiple Choice Worth 5 points)
(01.01 MC)
Which broad category is known for protecting sensitive information in both digital and hard-copy forms?
O Cybersecurity
O Information protection
O Information assurance
Internet Crime Complaint Center
Answer:
Information assurance
Explanation:
Data theft can be defined as a cyber attack which typically involves an unauthorized access to a user's data with the sole intention to use for fraudulent purposes or illegal operations. There are several methods used by cyber criminals or hackers to obtain user data and these includes DDOS attack, SQL injection, man in the middle, phishing, etc.
Information assurance is a broad category that is typically used by cybersecurity or network experts to protect sensitive user information such as passwords, keys, emails, etc., in both digital and hard-copy forms
You are developing a Windows forms application used by a government agency. You need to develop a distinct user interface element that accepts user input. This user interface will be reused across several other applications in the organization. None of the controls in the Visual Studio toolbox meets your requirements; you need to develop all your code in house.
Required:
What actions should you take?
Answer:
The answer is "Developing the custom control for the user interface"
Explanation:
The major difference between customized control & user control would be that it inherit throughout the inheritance tree at different levels. Usually, a custom power comes from the system. Windows. UserControl is a system inheritance.
Using accuracy up is the major reason for designing a custom UI control. Developers must know how to use the API alone without reading the code for your component. All public methods and features of a custom control will be included in your API.
2.2 Write a program that uses input to prompt a user for their name and then welcomes them. Note that input will pop up a dialog box. Enter Sarah in the pop-up box when you are prompted so your output will match the desired output.
Answer:
Explanation:
The following program is written in Javascript. It creates a prompt that asks the user for his/her name and saves it in a variable called userName. Then it uses that variable to welcome the user. A test case is shown in the images below with the desired output.
let userName = prompt("Enter Your Name")
alert(`Hello ${userName}`)
A blogger writes that the new "U-Phone" is superior to any other on the market. Before buying the U-Phone based on this review, a savvy consumer should (5 points)
consider if the blogger has been paid by U-Phone
assume the blogger probably knows a lot about U-Phones
examine multiple U-Phone advertisements
speak to a U-Phone representative for an unbiased opinion
Answer:
Speak to a U-Phone representative.
Explanation:
A representative will tell you the necessary details about the U-phone without any biases whatsoever, as they´re the closest to the company when it comes to detail about their products.
Write a program that will read two floating point numbers (the first read into a variable called first and the second read into a variable called second) and then calls the function swap with the actual parameters first and second. The swap function having formal parameters number1 and number2 should swap the value of the two variables.
Sample Run:
Enter the first number
Then hit enter
80
Enter the second number
Then hit enter
70
You input the numbers as 80 and 70.
After swapping, the first number has the value of 70 which was the value of the
second number
The second number has the value of 80 which was the value of the first number
Answer:
The program in Python is as follows:
def swap(number1,number2):
number1,number2 = number2,number1
return number1, number2
first = int(input("First: "))
second = int(input("Second: "))
print("You input the numbers as ",first,"and",second)
first,second= swap(first,second)
print("After swapping\nFirst: ",first,"\nSecond:",second)
Explanation:
This defines the function
def swap(number1,number2):
This swaps the numbers
number1,number2 = number2,number1
This returns the swapped numbers
return number1, number2
The main begins here
This gets input for first
first = int(input("First: "))
This gets input for second
second = int(input("Second: "))
Print the number before swapping
print("You input the numbers as ",first,"and",second)
This swaps the numbers
first,second= swap(first,second)
This prints the numbers after swapping
print("After swapping\nFirst: ",first,"\nSecond:",second)
Write a recursive function that returns 1 if an array of size n is in sorted order and 0 otherwise. Note: If array a stores 3, 6, 7, 7, 12, then isSorted(a, 5) should return 1 . If array b stores 3, 4, 9, 8, then isSorted(b, 4) should return 0.int isSorted(int *array, int n){
Answer:
Here the code is given as follows,
Explanation:
Code:-
#include <stdio.h>
int isSorted(int *array, int n) {
if (n <= 1) {
return 1;
} else {
return isSorted(array, n-1) && array[n-2] <= array[n-1];
}
}
int main() {
int arr1[] = {3, 6, 7, 7, 12}, size1 = 5;
int arr2[] = {3, 4, 9, 8}, size2 = 4;
printf("%d\n", isSorted(arr1, size1));
printf("%d\n", isSorted(arr2, size2));
return 0;
}
Output:-
Web-Based Game that serves multiple platforms
Recommendations
Analyze the characteristics of and techniques specific to various systems architectures and make a recommendation to The Gaming Room. Specifically, address the following:
1. Operating Platform: Recommend an appropriate operating platform that will allow The Gaming Room to expand Draw It or Lose It to other computing environments.>
2. Operating Systems Architectures:
3. Storage Management:
4. Memory Management:
5. Distributed Systems and Networks:
6. Security: Security is a must-have for the client. Explain how to protect user information on and between various platforms. Consider the user protection and security capabilities of the recommended operating platform.>
Answer:
Here the answer is given as follows,
Explanation:
Operating Platform:-
In terms of platforms, there are differences between, mobile games and pc games within the way it's used, the operator, the most event play, the sport design, and even the way the sport work. we all know that each one the games on console platforms, PC and mobile, have their own characteristic which has advantages and disadvantages All platforms compete to win the rating for the sake of their platform continuity.
Operating system architectures:-
Arm: not powerful compared to x86 has many limitations maximum possibility on arm arch is mobile gaming.
X86: very powerful, huge development so easy to develop games on platforms like unity and unreal, huge hardware compatibility and support
Storage management:-
On the storage side, we've few choices where HDD is slow and too old even a replacement console using SSD. so SSD is the suggested choice. But wait SSD have also many options like SATA and nvme.
Memory management:-
As recommended windows, Each process on 32-bit Microsoft Windows has its own virtual address space that permits addressing up to 4 gigabytes of memory. Each process on 64-bit Windows features a virtual address space of 8 terabytes. All threads of a process can access its virtual address space. However, threads cannot access memory that belongs to a different process.
Distributed systems and networks:-
Network-based multi-user interaction systems like network games typically include a database shared among the players that are physically distributed and interact with each other over the network. Currently, network game developers need to implement the shared database and inter-player communications from scratch.
Security:-
As security side every game, there's an excellent risk that, within the heat of the instant, data are going to be transmitted that you simply better keep to yourself. There are many threats to your IT.
Define on the whole data protection matters when developing games software may cause significant competitive advantages. Data controllers are obliged under the GDPR to attenuate data collection and processing, using, as an example , anonymization or pseudonymization of private data where feasible.
Gray London is a retired race car driver who helped Dale Earnhardt, Jr. get his start. He is writing a book and making a video about the early days or Dale Earnhardt. He is trying to decide whether to market these items directly over the Internet or to use intermediaries. To make this decision, he needs to know the pros and cons of each route. Provide that information and make a recommendation to him.
Answer:
Explanation:
Marketing your product directly over the internet can lead to much greater profits and there are many options that you can choose from in order to target the correct audience. Unfortunately, doing so does require marketing knowledge and is basically like growing a business. If you were to use intermediaries they already have the knowledge necessary to market your product but will take a percentage of the profits, which will ultimately limit your gains. Since Gray London is a race car driver, I am assumming that he does not have any prior technological expertise or marketing expertise, therefore I would recommend using intermediaries.
Write a function int checkBalance(char exp[]); that can take an expression as input and check whether the parenthesis used in that expression are valid or invalid. It returns 1 if it is valid, and returns 0 if it is not valid.For example, the following expressions are valid: [ A * {B (C D)}] and [{()()}]The following expressions are invalid: [ A * {B (C D})], [ { ( ] ) ( ) }
Answer:
Explanation:
The following code is written in Java. It uses for loops to loop through the array of characters, and uses IF statements to check if the symbols in the expression are balanced. If so it returns true, otherwise it breaks the function and returns false. Two test cases have been provided in the main method and the output can be seen in the attached image below.
import java.util.ArrayList;
class Brainly {
public static void main(String[] args) {
char[] exp = { '[', 'A', '*', '{', 'B', '(', 'C', 'D', ')', '}', ']'};
char[] exp2 = {'[', 'A', '*', '(', 'C', '}', ']'};
System.out.println(checkBalance(exp));
System.out.println(checkBalance(exp2));
}
public static boolean checkBalance(char exp[]) {
ArrayList<Character> symbols = new ArrayList<>();
for (char x: exp) {
if ((x =='[') || (x == '{') || (x == '(')) {
symbols.add(x);
}
if (x ==']') {
if (symbols.get(symbols.size()-1) == '[') {
symbols.remove(symbols.size()-1);
} else {
return false;
}
}
if (x =='}') {
if (symbols.get(symbols.size()-1) == '{') {
symbols.remove(symbols.size()-1);
} else {
return false;
}
}
if (x ==')') {
if (symbols.get(symbols.size()-1) == '(') {
symbols.remove(symbols.size()-1);
} else {
return false;
}
}
}
return true;
}
}
Difference between analog and hybrid computer in tabular form
Answer:
Analog computers are faster than digital. Analog computers lack memory whereas digital computers store information. ... It has the speed of analog computer and the memory and accuracy of digital computer. Hybrid computers are used mainly in specialized applications where both kinds of data need to be process.
hope it is helpful for you
LAB: Acronyms
An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.
If the input is
Institute of Electrical and Electronics Engineers
the output should be
IEEE
Answer:
LAB means laboratory
IEEE means institute of electrical and electronic engineer
When rating ads, I should only consider my personal feelings on the ad.
Answer:
yes when rating ads you should only consider your personal feelings on the ad
Write a program named edit_data.py that asks a person their age. Accept an int. Use a custom exception to return a message if the number entered is an int that is less than 1 or greater than 115. Create an exception that catches an error if a non int is entered.
An error that occurs while a program is being run is an exception. Non-programmers see exceptions as examples that do not follow a general rule.
What is the programming?
In computer science, the term "exception" also has the following connotation: It signifies that the issue is an uncommon occurrence; it is the "exception to the rule." Some programming languages use the mechanism known as exception handling to deal with problems automatically. Exception handling is built into several programming languages, including C++, Objective-C, PHP, Java, Ruby, Python, and many others.
In order to manage errors, programs often save the state of execution at the time the problem occurred and interrupt their usual operation to run an exception handler, which is a particular function or section of code. Depending on the type of error that had occurred, the error handler can "correct" the issue and the application can then continue using the previously saved data.
Thus, An error that occurs while a program is being run is an exception.
For more information about programming, click here:
https://brainly.com/question/11023419
#SPJ5
_____ is one of the Rs involved in design and implementation of any case-based reasoning (CBR) application.
Answer:
Group of answer choices
React
Reserve
Reason
Retain
I am not sure if its correct
Retain is one of the Rs involved in design and implementation of any case-based reasoning (CBR) application.
What is Case Based Reasoning?Case-based reasoning (CBR) is a known to be a form of artificial intelligence and cognitive science. It is one that likens the reasoning ways as primarily form of memory.
Conclusively, Case-based reasoners are known to handle new issues by retrieving stored 'cases' and as such ,Retain is one of the Rs that is often involved in design and implementation of any case-based reasoning (CBR) application.
Learn more about Retain case-based reasoning from
https://brainly.com/question/14033232
When she manages a software development project, Candace uses a program called __________, because it supports a number of programming languages including C, C , C
Answer:
PLS programming language supporting.
Explanation:
When she manages a software development project, Candace uses a program called PLS programming language supporting.
What is a software development project?Software development project is the project that is undertaken by the team of experts that developed through different format of coding language. The software development has specific time, budget, and resources.
Thus, it is PLS programming language
For more details about Software development project, click here:
https://brainly.com/question/14228553
#SPJ2
Given main(), complete the Car class (in file Car.java) with methods to set and get the purchase price of a car (setPurchasePrice(), getPurchasePrice()), and to output the car's information (printInfo()).
Ex: If the input is:
2011
18000
2018
where 2011 is the car's model year, 18000 is the purchase price, and 2018 is the current year, the output is:
Car's information:
Model year: 2011
Purchase price: 18000
Current value: 5770
Note: printInfo() should use three spaces for indentation.
Answer and Explanation:
public class Main {
int Carmodel;
int Purchaseprice;
int Currentyear;
Public void setPurchasePrice(int Purchaseprice){
this.Purchaseprice=Purchaseprice;
}
Public void getPurchasePrice(){
return Purchaseprice;
}
static void printInfo(int Carmodel int Currentyear ){
this.Carmodel=Carmodel;
this.Currentyear=Currentyear;
System.out.println(getPurchasePrice() Carmodel Currentyear);
}
}
The above java program defines a class that has three methods, a get method that returns purchase price of the object, a set method that sets purchase price of the object, and a print method that print out the information about the car object(model, year, price). The print method also takes arguments and assigns values of the arguments/parameters to the object, then prints all.
write a loop that reads positive integers from stands input and that terinated when it reads an interger that is not positive after the loop termpinates
Loop takes only positive numbers and terminates once it encounters a negative numbers.
Answer and Explanation:
Using javascript:
Var positiveInt= window.prompt("insert positive integer");
While(positiveInt>=0){
Alert("a positive integer");
Var positiveInt= window.prompt("insert positive integer");
}
Or we use the do...while loop
Var positiveInt= window.prompt("insert positive integer");
do{
Var positiveInt= window.prompt("insert positive integer");
}
While (positiveInt>=0);
The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input
Identify and differentiate between the two (2) types of selection structures
Answer:
there are two types of selection structure which are if end and if else first the differentiation between if and end if else is if you want your program to do something if a condition is true but do nothing if that condition is false then you should use an if end structure whereas if you want your program to do something if a condition is true and do something different if it is false then you should use an if else structure
You are between flights at the airport and you want to check your email. Your wireless settings show two options:
a) a free unsecured site called TerminalAir and b) a pay-by-the-hour site called Boingo.
Which one is likely to be the most secure?
The valid call to the function installApplication is
void main( )
{
// call the function installApplication
}
void installApplication(char appInitial, int appVersion)
{
// rest of function not important
}
Answer:
B. installApplication(‘A’, 1);
Explanation:
Given
The above code segment
Required
The correct call to installApplication
The function installApplication is declared as void, meaning that it is not expected to return anything.
Also, it receives a character and an integer argument.
So, the call to this function must include a character and an integer argument, in that order.
Option D is incorrect because both arguments are integer
Option C is incorrect because it passes no argument to the function.
Option A is incorrect because it receives an integer value from the function (and the function is not meant not to have a return value).
Option B is correct
what is Microsoft word
Answer:
A software where you can document letters, essays or anything really.
Explanation:
You have recently subscribed to an online data analytics magazine. You really enjoyed an article and want to share it in the discussion forum. Which of the following would be appropriate in a post?
A. Including an advertisement for how to subscribe to the data analytics magazine.
B. Checking your post for typos or grammatical errors.
C. Giving credit to the original author.
D. Including your own thoughts about the article.
Select All that apply
Answer:
These are the things that are would be appropriate in a post.
B. Checking your post for typos or grammatical errors.
C. Giving credit to the original author.
D. Including your own thoughts about the article.
Explanation:
The correct answer options B, C, and D" According to unofficial online or internet usage it is believed that sharing informative articles is a reasonable use of a website forum as much the credit goes back to the actual or original author. Also, it is believed that posts should be suitable for data analytics checked for typos and grammatical errors.
LAB: Count characters - methods
Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string.
Ex: If the input is
n Monday
the output is
1
Ex: If the input is
Today is Monday
the output is
0
Ex: If the input is
n it's a sunny day
the output is
0
Your program must define and call the following method that returns the number of times the input character appears in the input string public static int countCharacters (char userChar, String userString)
Note: This is a lab from a previous chapter that now requires the use of a method
LabProgram.java
1 import java.util.Scanner
2
3 public class LabProgram
4
5 /* Define your method here */
6
7 public static void main(String[] args) {
8 Type your code here: * >
9 }
10 }
Answer:
i hope understand you
mark me brainlist
Explanation:
using namespace std;
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define BLANK_CHAR (' ')
int CountCharacters(char userChar, char * userString)
{
int countReturn=0;
int n = strlen(userString);
for (int iLoop=0; iLoop<n; iLoop++)
{
if (userString[iLoop]==userChar)
{
countReturn++;
}
}
return(countReturn);
}
/******************************************
Removes white spaces from passed string; returns pointer
to the string that is stripped of the whitespace chars;
Returns NULL pointer is empty string is passed;
Side Effects:
CALLER MUST FREE THE OUTPUT BUFFER that is returned
**********************************************************/
char * RemoveSpaces(char * userString)
{
char * outbuff = NULL;
if (userString!=NULL)
{
int n = strlen(userString);
outbuff = (char *) malloc(n);
if (outbuff != NULL)
{
memset(outbuff,0,n);
int iIndex=0;
//copies non-blank chars to outbuff
for (int iLoop=0; iLoop<n; iLoop++)
{
if (userString[iLoop]!=BLANK_CHAR)
{
outbuff[iIndex]=userString[iLoop];
iIndex++;
}
} //for
}
}
return(outbuff);
}
int main()
{
char inbuff[255];
cout << " PLEASE INPUT THE STRING OF WHICH YOU WOULD LIKE TO STRIP WHITESPACE CHARS :>";
gets(inbuff);
char * outbuff = RemoveSpaces(inbuff);
if (outbuff !=NULL)
{
cout << ">" << outbuff << "<" << endl;
free(outbuff);
}
memset(inbuff,0,255);
cout << " PLEASE INPUT THE STRING IN WHICH YOU WOULD LIKE TO SEARCH CHAR :>";
gets(inbuff);
char chChar;
cout << "PLEASE INPUT THE CHARCTER YOU SEEK :>";
cin >> chChar;
int iCount = CountCharacters(chChar,inbuff);
cout << " char " << chChar << " appears " << iCount << " time(s) in >" << inbuff << "<" << endl;
}
Suppose during a TCP connection between A and B, B acting as a TCP receiver, sometimes discards segments received out of sequence, but sometimes buffers them. Would the data sent by A still be delivered reliably and in-sequence at B? Explain why.
Answer:
Yes
Explanation:
We known that TCP is the connection [tex]\text{oriented}[/tex] protocol. So the TCP expects for the target host to acknowledge or to check that the [tex]\text{communication}[/tex] session has been established or not.
Also the End stations that is running reliable protocols will be working together in order to verify transmission of data so as to ensure the accuracy and the integrity of the data. Hence it is reliable and so the data can be sent A will still be delivered reliably and it is in-sequence at B.
Suppose that you write a subclass of Insect named Ant. You add a new method named doSomething to the Ant class. You write a client class that instantiates an Ant object and invokes the doSomething method. Which of the following Ant declarations willnot permit this? (2 points)I. Insect a = new Ant ();II. Ant a = new Ant ();III. Ant a = new Insect ();1) I only2) II only3) III only4) I and II only5) I and III only
Answer:
5) I and III only
Explanation:
From the declarations listed both declarations I and III will not permit calling the doSomething() method. This is because in declaration I you are creating a superclass variable but initializing the subclass. In declaration III you are doing the opposite, which would work in Java but only if you cast the subclass to the superclass that you are initializing the variable with. Therefore, in these options the only viable one that will work without error will be II.
Need help coding a sql probelm (not that hard im just confused)
Answer:
random answer
Explanation:
point = selct dnsggg
Explain why interrupt times and dispatch delays must be limited to a hard real-time system?
Answer:
The important problem is explained in the next section of clarification.
Explanation:
The longer it is required for a computing device interrupt to have been performed when it is created, is determined as Interrupt latency.
The accompanying duties include interrupt transmission delay or latency are provided below:
Store the instructions now being executed.Detect the kind of interruption.Just save the present process status as well as activate an appropriate keep interrupting qualitative functions.Which of the following is a benefit of a digital network?
Security is enhanced.
Multiple devices can be connected.
Users are familiar with the software.
It makes using the internet easier.
Answer:
Multiple devices can be connected
The social network created through digital technology is referred to as a "digital network." It provides phone, video, data, and other network services for digital switching and transmission.
What is Digital network?In order to align the network with business demands, it has markets, data networks, and communications networks.
Digital networks' core are networking components like switches, routers, and access points. These tools are used to link networks to other networks, secure equipment like computers and servers connected to organizational networks, and analyze data being sent across networks.
Through cloud-enabled central administration, digital networks provide end-to-end network services for on-premises and cloud space. All network components are monitored, analyzed, and managed by a central server.
Therefore, The social network created through digital technology is referred to as a "digital network." It provides phone, video, data, and other network services for digital switching and transmission.
To learn more about Technology, refer to the link:
https://brainly.com/question/9171028
#SPJ2
Mối quan hệ giữa đối tượng và lớp
1. Lớp có trước, đối tượng có sau, đối tượng là thành phần của lớp
2. Lớp là tập hợp các đối tượng có cùng kiểu dữ liệu nhưng khác nhau về các phương thức
3. Đối tượng là thể hiện của lớp, một lớp có nhiều đối tượng cùng thành phần cấu trúc
4. Đối tượng đại diện cho lớp, mỗi lớp chỉ có một đối tượng
Answer:
please write in english i cannot understand
Explanation: