Answer:
see explaination
Explanation:
import java.io.*;
import java.util.Scanner;
public class Winners {
public static void main(String args[]) throws IOException {
Scanner sc = new Scanner(new File("WorldSeriesWinners.txt"));
String commands[] = new String[100000];
int c = 0;
while (sc.hasNextLine()) {
String input = sc.nextLine();
System.out.println(input);
if (input.isEmpty())
continue;
commands[c++] = input;
}
sc.close();
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter the name of a team: ");
String name = keyboard.nextLine();
int count = 0;
for (int i = 0; i < c; i++) {
if (commands[i] != null) {
if (commands[i].equals(name)) {
++count;
}
}
}
if(count!=0)
System.out.println(name + " has won the World Series in the time period from 1903 through 2018 " +count + " number of times" );
else
System.out.println("Team with name "+name+ " does not exists");
}
}
Give the type and value of each result of the following Java expressions. a. (5 / 2) * 2.0 type is float value is 4.0 b. (5/2.0) * 2 type is integer value is 5c. "1.3" + "5.2" type is string value is 1.35.2d. 1 + 7.0 + "2" + "x" this will produce an error because we cannot add variables of different type
You didn't specify what the program should output, so there are many possibilities that result in a working program. It *looks* like this was intended:
int x = 24;
int y;
y = x-12;
cout<<y<<endl;
and it will display 12.
There are 4 different types of communication and I can share my experience by helping you out to solve the assignment.
Explanation:
1. Verbal Communication:
- Communication with voice
- Provides active listening
- Body language is equally important.
2. Non-Verbal:
- Body language is the most important
- Communicating without using the words
3. Visual communication:
- Listening contents through photos and videos
4. Written communication:
- Serves as record
- Does not require tone
So in day today aspect we come across almost all type of communication. To answer the discussed question
1. Did the variety of communication surprised you?
I would say yes. I can say unknowingly I have experienced various types.
2. Did you find that your were more involved in one type of communication?
I would say yes. People may like communication type depending on their interest and skill set. So according to me even I have involved in my life with one set of communication and I am trying to use it more.
3. Which one(s) is/are most involved?
So it differs from people to people. I like verbal communication, because I am good at speaking with good tone and voice. Also, I am attracted towards visual communication because one picture will talk more than what an essay would communicate.
False.
Linux is the most secure operating system