(Count the occurrences of words in a text file) Rewrite Listing 21.9 to read the text from a text file. The text file is passed as a command-line argument. Words are delimited by whitespace characters, punctuation marks (, ; . : ?), quotation marks (' "), and parentheses. Count the words in a case-sensitive fashion (e.g., consider Good and good to be the same word). The words must start with a letter. Display the output of words in alphabetical order, with each word preceded by the number of times it occurs.
I ran my version of the program solution on its own Java source file to produce the following sample output:
C:\Users\......\Desktop>java CountOccurrenceOfWords CountOccurrenceOfWords.java
Display words and their count in ascending order of the words
1 a
1 alphabetical
1 an
2 and
3 args
2 as
1 ascending
1 catch
1 class
4 count
2 countoccurrenceofwords
1 create
1 display
1 else
3 entry
3 entryset
2 ex
1 exception
1 exit
1 file
2 filename
3 for
1 fullfilename
3 get
1 getkey
1 getvalue
1 hasnext
1 hold
5 i
3 if
2 import
2 in
3 input
2 int
1 io
3 java
6 key
3 length
2 line
1 main
3 map
1 matches
3 new
1 nextline
1 null
1 of
2 order
3 out
3 println
1 printstacktrace
2 public
2 put
2 scanner
1 set
1 split
1 static
5 string
4 system
2 the
1 their
1 to
1 tolowercase
2 tree
6 treemap
2 trim
1 try
1 util
1 value
1 void
1 while
9 words
C:\Users\......\Desktop>

Answers

Answer 1

Answer:

Explanation:

The following is written in Java. It uses File input, to get the file and read every line in the file. It adds all the lines into a variable called fullString. Then it uses regex to split the string into separate words. Finally, it maps the words into an array that counts all the words and how many times they appear. A test case has been created and the output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

(Count The Occurrences Of Words In A Text File) Rewrite Listing 21.9 To Read The Text From A Text File.

Related Questions

If you fail a course as a MAIN (residency) course, you can repeat that course as either a MAIN (residency) or an online (IG or IIG) course.
A. True
B. False

Answers

it depends on where you are taking your courses. In most cases the answer would be true

A user reports network resources can no longer be accessed. The PC reports a link but will only accept static IP addresses. The technician pings other devices on the subnet, but the PC displays the message Destination unreachable. Wh are MOST likley the causes of this issue?

Answers

Answer: is this a real question but I think it would be Ip address hope this helps :)))

Explanation:

Why input screens are better data entry than entreing data dirrctly to a table

Answers

Answer:

are better data entry designs than entering data directly to a table. ... hence a user can design input fields linked to several tables/queries.

Explanation:

Input screens are better data entry designs than entering data directly to a table because a user can design input fields linked to several tables/queries.

What is digital information?

Digital information generally consists of data that is created or prepared for electronic systems and devices such as computers, screens, calculators, communication devices. These information are stored by cloud.

They are converted from digital to analog and vice versa with the help of a device.

Data entered in the table directly is easier than data entry method.

Thus, input screens are better data entry than entering data directly to a table.

Learn more about digital information.

https://brainly.com/question/4507942

#SPJ2

Given below are some facts and predicates for some knowledge base (KB). State if the unification for either variable x or y is possible or not. If the unification is possible then show the unified values for variables x and y.

a. American (Bob), American (y)
b. Enemy (Nono, America), Enemy(x,y)
c. Weapon (Missile), soldTo (Missile, y), Weapon (x), soldTo (x, Nono)
d. L(x, y), (L(y, x) ^ L(A, B))

Answers

Answer:

Unification may be a process by which two logical individual atomic expressions, identical by replacing with a correct substitution. within the unification process, two literals are taken as input and made identical using the substitution process. There are some rules of substitution that has got to be kept in mind:

The predicate symbol must be an equivalent for substitution to require place.

The number of arguments that are present in both expressions must be equivalent.

Two similar variables can't be present within the same expression

Explanation:

a. American (Bob), American (y):-

In this scenario, Unification is feasible consistent with the principle. The substitution list is going to be [y/Bob].

b. Enemy (Nono, America), Enemy(x,y):-

In this scenario, the Unification is feasible consistent with the principles. The substitution list is going to be [x/Nono, y/America].

c. Weapon (Missile), soldTo (Missile, y), Weapon (x), soldTo (x, Nono):-

In this scenario, the Unification isn't possible because the predicate is different i.e. Weapon and soldTo.

d. L(x, y), (L(y, x) ^ L(A, B)):-

In this scenario, Unification isn't possible because the number of arguments is different within the given expression

Should you remove jewelry, pens, and other metal objects before entering the magnetic resonance (MR) environment even if the equipment is not in use?

Answers

Answer:

Yes you should

Explanation:

When you are about to enter the mr the best thing you should do is to take off any form of metallic objects that you may have on you this could be a wrist watch, it could be other forms of accessories such as hair clips, keys or even coins. having any of these objects on you could cause a person to have an injury.

This is because this object could change its position when in the room also it could cause signal losses and could also make objects unclear for the radiologist

write short note on the following: Digital computer, Analog Computer and hybrid computer​

Answers

Answer:

Hybrid Computer has features of both analogue and digital computer. It is fast like analogue computer and has memory and accuracy like digital computers. It can process both continuous and discrete data. So it is widely used in specialized applications where both analogue and digital data is processed.

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

Answers

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.

A student registers for a course in a university. Courses may have limited enrollment i.e a student must
enroll atmost 9 credit hours, the registration process must include checks that places are available. Assume
that the student accesses an electronic course catalog to find out about available courses. Which design
model should be followed by this secenario? Draw any two UML diagrams.

Answers

Answer:

Follows are the complete question to the given question:

Explanation:

The UML scheme is a UML-based diagram intended to depict the system visually, together with its key actors, roles, activities, objects, and classes, to gather information the about system, change that, or maintain it.

Every complex process is better understood via sketches or pictures. These diagrams have a higher understanding effect. By glancing about, we notice that diagrams are not a new idea but are widely used in various business types. To enhance understanding of the system, we prepare UML diagrams. There is not enough of a single diagram to represent all aspects of the system. You can also create customized diagrams to satisfy your needs. Iterative and incremental diagrams are usually done.

There are two broad diagram categories and that they are broken into subclasses again:

Diagram structureDiagrams of behavior

Please find the graph file of the question in the attachment.

Answer to this problem

Answers

Answer:

hi..,.................................................

3. Circular, array-backed queue In the following class, which you are to complete, the backing array will be created and populated with Nones in the __init__ method, and the head and tail indexes set to sentinel values (you shouldn't need to modify __init__). Enqueuing and Dequeuing items will take place at the tail and head, with tail and head tracking the position of the most recently enqueued item and that of the next item to dequeue, respectively. To simplify testing, your implementation should make sure that when dequeuing an item its slot in the array is reset to None, and when the queue is emptied its head and tail attributes should be set to -1.

Answers

Answer:

#Implementation of Queue class

class Queue

   #Implementation of _init_

   def _init_(self, limit=10):

       #calculate the self.data

       self.data = [None] * limit

       self.head = -1

       self.tail = -1

   #Implementation of enqueue function

   def enqueue(self, val):

       #check self.head - self.tail is equal to 1

       if self.head - self.tail == 1:

           raise NotImplementedError

       #check len(self.data) - 1 is equal to elf.tail

       if len(self.data) - 1 == self.tail and self.head == 0:

           raise NotImplementedError

       #check self.head is equal to -1

       if self.head == -1 and self.tail == -1:

           self.data[0] = val

           self.head = 0

           self.tail = 0

       else:

           #check len(self.data) - 1 is equal to self.tail

           if len(self.data) - 1 == self.tail and self.head != 0:

               self.tail = -1

           self.data[self.tail + 1] = val

           #increment the self.tail value

           self.tail = self.tail + 1

   #Implementation of dequeue method

   def dequeue(self):

       #check self.head is equal to self.tail

       if self.head == self.tail:

           temp = self.head

           self.head = -1

           self.tail = -1

           return self.data[temp]

   

       #check self.head is equal to -1

       if self.head == -1 and self.tail == -1:

           #raise NotImplementedError

          raise NotImplementedError

       #check self.head is not equal to len(self.data)

       if self.head != len(self.data):

           result = self.data[self.head]

           self.data[self.head] = None

           self.head = self.head + 1

       else:

          # resetting head value

           self.head = 0

           result = self.data[self.head]

           self.data[self.head] = None

           self.head = self.head + 1

       return result

   #Implementation of resize method

   def resize(self, newsize):

       #check len(self.data) is less than newsize

       assert (len(self.data) < newsize)

       newdata = [None] * newsize

       head = self.head

       current = self.data[head]

       countValue = 0

       #Iterate the loop

       while current != None:

           newdata[countValue] = current

           countValue += 1

           #check countValue is not equal to 0

           if countValue != 0 and head == self.tail:

               break

           #check head is not equal to

           #len(self.data) - 1

           if head != len(self.data) - 1:

               head = head + 1

               current = self.data[head]

           else:

               head = 0

               current = self.data[head]

     self.data = newdata

       self.head = 0

       self.tail = countValue - 1

   #Implementation of empty method

   def empty(self):

       #check self.head is equal to -1

       # and self.tail is equal to -1

       if self.head == -1 and self.tail == -1:

           return True

       return False

   #Implementation of _bool_() method

   def _bool_(self):            

       return not self.empty()

   #Implementation of _str_() method        

   def _str_(self):

       if not (self):

           return ''

       return ', '.join(str(x) for x in self)

   #Implementation of _repr_ method

   def _repr_(self):

       return str(self)

   #Implementation of _iter_ method

   def _iter_(self):

       head = self.head

       current = self.data[head]

       countValue = 0

       #Iterate the loop

       while current != None:

           yield current

           countValue += 1

           #check countValue is not equal to zero

           #check head is equal to self.tail

           if countValue != 0 and head == self.tail:

               break

           #check head is not equal to len(self.data) - 1

           if head != len(self.data) - 1:

               head = head + 1

               current = self.data[head]

           else:

               head = 0

               current = self.data[head

Explanation:-

Output:

what is a high level language?​

Answers

Answer:

a high level language is any programming language that enables development of a program in a much more user friendly programming context and is generally independent of the computers hardware architecture.

Answer:

A high-level language is any programming language that enables development of a program in a much more user-friendly programming context and is generally independent of the computer's hardware architecture.

write a script to check command arguments. Display the argument one by one (use a for loop). If there is no argument provided, remind users about the mistake.

Answers

Answer and Explanation:

Using Javascript programming language, to write this script we define a function that checks for empty variables with if...else statements and then uses a for loop to loop through all arguments passed to the function's parameters and print them out to the console.

function Check_Arguments(a,b,c){

var ourArguments= [];

if(a){

ourArguments.push(a);}

else( console.log("no argument for a"); )

if(b){

ourArguments.push(b);}

else( console.log("no argument for b"); )

if(c){

ourArguments.push(c);}

else( console.log("no argument for c"); )

for(var i=0; i<ourArguments.length; i++){

Console.log(ourArguments[i]);

}

}

Select the correct statement(s) regarding DCE and DTE interfaces.

a. DTE and DCE describes the device types (e.g., computers, switches, routers, etc.)
b. distinguishing between DTE and DCE is only required for half-duplex communications
c. DTE and DCE describes the interface and direction of data flow between devices; a single device may have both types of interfaces
d. all statements are correct

Answers

Answer:

The correct statement regarding DCE and DTE interfaces is:

c. DTE and DCE describes the interface and direction of data flow between devices; a single device may have both types of interfaces.

Explanation:

DTE stands for Data Terminal Equipment.  It is a device that initiates or controls a device's serial connection. The term DCE stands for Data Communications Equipment.  It is a device that is used to a modem or other communication interfaces to the DTE device.  DTE is a communication receptor, while DCE is a communication broadcaster or distributor.

discuss the first three phases of program development cycle​

Answers

Answer:

Known as software development life cycle, these steps include planning, analysis, design, development & implementation, testing and maintenance.

When a database stores the majority of data in RAM rather than in hard disks, it is referred to as a(n) _____ database.

Answers

Answer:

in-memory.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

In this context, data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

Hence, a database management system (DBMS) is a system that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

Radom Access Memory (RAM) can be defined as the main memory of a computer system which allow users to store commands and data temporarily.

Generally, the Radom Access Memory (RAM) is a volatile memory and as such can only retain data temporarily.

All software applications temporarily stores and retrieves data from a Radom Access Memory (RAM) in computer, this is to ensure that informations are quickly accessible, therefore it supports read and write of files.

Generally, when a database stores the majority of data in random access memory (RAM) rather than in hard disks, it is referred to as an in-memory database (IMDB).

An in-memory database (IMDB) is designed to primarily to store data in the main memory of a computer system rather than on a hard-disk drive, so as to enhance a quicker response time for the database management system (DBMS).

_____ is one of the Rs involved in design and implementation of any case-based reasoning (CBR) application.

Answers

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

2. Which tab is used to edit objects on the Slide Master and layouts?
A. View
B. Insert
C. Shape format
D. Design

Answer is not A. View
It’s B. Insert

Answers

Answer:

it is....insert tab..B

Explanation:

insert tab includes editing options

View "The database tutorial for beginners" and discuss how database management systems are different from spreadsheets. Describe one experience you have had working with data.

Answers

Answer and Explanation:

A spreadsheet is an interactive computer application for the analysis and storage of data. The database is a collection of data and accessed from the computer system. This is the main difference between spreadsheets and databases. The spreadsheet is accessed by the user and the database is accessed by the user. The database can store more data than a spreadsheet. The spreadsheet is used for tasks and used in enterprises to store the data. Spreadsheet and database are two methods and the main difference is the computer application that helps to arrange, manage and calculate the data. The database is a collection of data and organized to access easily. Spreadsheet applications were the first spreadsheet on the mainframe. Database stores and manipulates the data easily. The database maintains the data and stores the records of teachers and courses. The spreadsheet is the computer application and analyzing the data in table form. The spreadsheet is a standard feature for productive suite and based on an accounting worksheet.

shooting phases in film and video editing​

Answers

Answer:

Filmmaking involves a number of complex and discrete stages including an initial story, idea, or commission, through screenwriting, casting, shooting, sound recording and pre-production, editing, and screening the finished product before an audience that may result in a film release and an exhibition.

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?

Answers

The correct answers Is B

Usually, in organizations, the policy and mechanism are established by the:

CEO

Team of Exectives

Board of Directors

Stakeholders

none of these

Answers

Answer:

Team of exectives

Explanation:

This is right answer please answer my question too

In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the quality of data visualization Users don't know what they are looking for Users typically look for anomaly in the data

Answers

Answer: Users expect to see a certain pattern in the data

Explanation:

Confirmatory Data Analysis occurs when the evidence is being evaluated through the use of traditional statistical tools like confidence, significance, and inference.

In this case, there's an hypothesis and the aim is to determine if the hypothesis is true. In this case, we want to know if a particular pattern on the data visualization conforms to what we have.


The part of the computer that provides access to the Internet is the

Answers

Answer:

MODEM

Explanation:

If you fail a course as a MAIN (residency) course, you can repeat that course as either a MAIN (residency) or an online (IG or IIG) course. True False

Answers

Answer: False

Explanation:

The statement that "you fail a course as a MAIN (residency) course, you can repeat that course as either a MAIN (residency) or an online (IG or IIG) course" is false.

It should be noted that if one fail a course as a residency course, the course can only be repeated as a main (residency) course and not an online course. When a course is failed, such course has to be repeated the following semester and this will give the person the chance to improve their GPA.

Java !!!
A common problem in parsing computer languages and compiler implementations is determining if an input string is balanced. That is, a string can be considered balanced if for every opening element ( (, [, <, etc) there is a corresponding closing element ( ), ], >, etc).
Today, we’re interested in writing a method that will determine if a String is balanced. Write a method, isBalanced(String s) that returns true if every opening element is matched by a closing element of exactly the same type. Extra opening elements, or extra closing elements, result in an unbalanced string. For this problem, we are only interested in three sets of characters -- {, (, and [ (and their closing equivalents, }, ), and ]). Other characters, such as <, can be skipped. Extra characters (letters, numbers, other symbols) should all be skipped. Additionally, the ordering of each closing element must match the ordering of each opening element. This is illustrated by examples below.
The following examples illustrate the expected behaviour:
is Balanced ("{{mustache templates use double curly braces}}") should return true
is Balanced("{{but here we have our template wrong!}") should return false
is Balanced("{ ( ( some text ) ) }") should return true
is Balanced("{ ( ( some text ) } )") should return false (note that the ordering of the last two elements is wrong)
Write an implementation that uses one or more Stacks to solve this problem. As a client of the Stack class, you are not concerned with how it works directly, just that it does work.

Answers

Answer:

Explanation:

import java.util.*;

public class BalancedBrackets {

// function to check if brackets are balanced

static boolean isBalanced(String expr)

{

Stack<Character> stack = new Stack<Character>();

for (int i = 0; i < expr.length(); i++)

{

char x = expr.charAt(i);

if (x == '(' || x == '[' || x == '{')

{

// Push the element in the stack

stack.push(x);

continue;

}

if (stack.isEmpty())

return false;

char check;

switch (x) {

case ')':

check = stack.pop();

if (check == '{' || check == '[')

return false;

break;

case '}':

check = stack.pop();

if (check == '(' || check == '[')

return false;

break;

case ']':

check = stack.pop();

if (check == '(' || check == '{')

return false;

break;

}

}

// Check Empty Stack

return (stack.isEmpty());

}

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

System.out.println("\nEnter the expression to check is balanced or not !");

String expr = scan.nextLine();

boolean output;

output = isBalanced(expr);

System.out.println(output);

if (output)

System.out.println("Balanced ");

else

System.out.println("Not Balanced ");

scan.close();

}

}

Which of the following financial functions can you use to calculate the payments to repay your loan

Answers

Answer:

PMT function. PMT, one of the financial functions, calculates the payment for a loan based on constant payments and a constant interest rate. Use the Excel Formula Coach to figure out a monthly loan payment.

Explanation:

What order? (function templates) Define a generic function called CheckOrder() that checks if four items are in ascending, neither, or descending order. The function should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order. The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, strings, characters, or doubles. Ex. If the input is:

Answers

Answer:

Explanation:

The following code was written in Java and creates the generic class to allow you to compare any type of data structure. Three different test cases were used using both integers and strings. The first is an ascending list of integers, the second is a descending list of integers, and the third is an unordered list of strings. The output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Order: " + checkOrder(10, 22, 51, 53));

       System.out.println("Order: " + checkOrder(55, 44, 33, 22));

       System.out.println("Order: " + checkOrder("John", " Gabriel", "Daniela", "Zendaya"));

   }

   public static <E extends Comparable<E>> int checkOrder(E var1, E var2, E var3, E var4) {

       E prevVar = var1;

       if (var2.compareTo(prevVar) > 0) {

           prevVar = var2;

       } else {

           if (var3.compareTo(prevVar) < 0) {

               prevVar = var3;

           } else {

               return 0;

           }

           if (var4.compareTo(prevVar) < 0) {

               return 1;

           }  else {

               return 0;

           }

       }

       if (var3.compareTo(prevVar) > 0) {

           prevVar = var3;

       }

       if (var4.compareTo(prevVar) > 0) {

           return -1;

       }

       return 0;

   }

}

the id selector uses the id attribute of an html element to select a specific element give Example ?​

Answers

Answer:

The id selector selects a particular html element

Explanation:

The id selector is uses the id attribute to select a specific html element. For example, if we have a particular header which is an html element and we want to give it a particular background color, we use the id selector and give it an id attribute in the CSS file. An example of an html header with id = 'blue' is shown below. The style sheet is an internal style sheet.

!doctype html

<html>

<head>

<title>Test</title>

<style>

#blue { background-color: blue;

}

</style>

</head>

<body>

<h1 id = 'blue'>Our holiday</h1>

<p>This is the weekend</p>

</body>

</html>

why concurrency control is needed in transaction.
And why Acid properties in transaction is important.

Answers

Explanation:

Concurrency Control in Database Management System is a procedure of managing simultaneous operations without conflicting with each other. It ensures that Database transactions are performed concurrently and accurately to produce correct results without violating data integrity of the respective Database.And The ACID properties, in totality, provide a mechanism to ensure correctness and consistency of a database in a way such that each transaction is a group of operations that acts a single unit, produces consistent results, acts in isolation from other operations and updates that it makes are durably stored.

Write a program in c++ that will:1. Call a function to input temperatures for consecutive days in 1D array. NOTE: The temperatures will be integer numbers. There will be no more than 10 temperatures.The user will input the number of temperatures to be read. There will be no more than 10 temperatures.2. Call a function to sort the array by ascending order. You can use any sorting algorithm you wish as long as you can explain it.3. Call a function that will return the average of the temperatures. The average should be displayed to two decimal places.Sample Run:Please input the number of temperatures to be read5Input temperature 1:68Input temperature 2:75Input temperature 3:36Input temperature 4:91Input temperature 5:84Sorted temperature array in ascending order is 36 68 75 84 91The average temperature is 70.80The highest temperature is 91.00The lowest temperature is 36.00

Answers

Answer:

The program in C++ is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int* sortArray(int temp [], int n){

   int tmp;

   for(int i = 0;i < n-1;i++){

 for (int j = i + 1;j < n;j++){

  if (temp[i] > temp[j]){

   tmp  = temp[i];

   temp[i] = temp[j];

   temp[j] = tmp;   }  } }

return temp;

}

float average(int temp [], int n){

   float sum = 0;

   for(int i = 0; i<n;i++){

       sum+=temp[i];    }

   return sum/n;

}

int main(){

   int n;

   cout<<"Number of temperatures: ";    cin>>n;

   while(n>10){

       cout<<"Number of temperatures: ";    cin>>n;    }

   int temp[n];

   for(int i = 0; i<n;i++){

       cout<<"Input temperature "<<i+1<<": ";

       cin>>temp[i];    }

   int *sorted = sortArray(temp, n);

   cout<<"The sorted temperature in ascending order: ";

   for( int i = 0; i < n; i++ ) {  cout << *(sorted + i) << " ";   }

   cout<<endl;

   float ave = average(temp,n);

   cout<<"Average Temperature: "<<setprecision(2)<<ave<<endl;

   cout<<"Highest Temperature: "<<*(sorted + n - 1)<<endl;

   cout<<"Lowest Temperature: "<<*(sorted + 0)<<endl;

   return 0;

}

Explanation:

See attachment for complete source file with explanation

Other Questions
What Northern group invaded the Ming Empire and defeated the Ming Army? evaluate expression when a=5 b= -3 6a-b This equation has one solution.3(x 2) + 4x = 10(x + 1) what is the solution? -5 -2 -16/3 -16/7 a)if AB ={(1,2),(2,3),(1,3),(2,2),(3,2),(3,3)} find i) set A ii) set B.i need for exam the letter v has an unknown value. If you multiply v by 16, the product is 4.what is the value of v? Why has the number of people in the world increased if the human population growth rate has decreased? convert 2.4 milimetres into metre You are required to prepare, through education and ongoing study, to achieve and maintain your expertise in the industry in order to be able to competently represent the Buyer. This is an example of Would 1 pound of peanut butter occupy more or less space than 1 pound of water? What is the product? Alex thinks of a number. he squares it, then takes away five .Next multiplies it by 4 ,takes away seven, divides it by three ,and finally adds six his answer is nine what number did he start with Extrae los 11 adjetivos calificativos presentes en el siguiente texto en un pais nuevo vivio un campesino orgulloso que tenia tres hijos jesus jose y enrique jesus era gordo de cara colorada y de pesimos modales jose era de cabeza grande ojos chicos y caracter dificil enrique tenia rostro delgado nariz aguilea y voz gruesa porfa es para hoy gran recompesa al que la responda Which form of communication is preferred if only an overview of a subject needs to be told? what most likely caused the man in the caravan to come to the farmhouse where elisa lived? a.he had lost his dog in the vast,open areas b.he needed to purchase supplies c.the country roads confused him d. he was looking for an adventure The line y = 2x + 6 cuts the x-axis at A and the y-axis at B. Find(a) the length of AB, (b) the shortest distance of O to AB, where O is the origin (0,0) When an application has multiple uses what is it known as?A. Minimum Features B. Full Featured C. Limited FeaturesD. Maximum Features The last dividend paid by Wilden Corporation was $1.55. The dividend growth rate is expected to be constant at 1.5% for 2 years, after which dividends are expected to grow at a rate of 6.0% forever. The firm's required return (rs) is 12.0%. What is the best estimate of the current stock price? Question:which is a y-intercept of the graphed function?Answers:A. (-9,0)B. (-3,0)C. (0,-9) D. (0,-3) Which is a possible consequence of decreasing air quality resulting from global warming? drying out of fertile lands flooding of low-lying coastal areas melting of glaciers and polar ice caps decrease in population due to health threats The correct answer is decrease in population due to health threats. You are an off-duty officer who has just completed a three-mile run. You decide to cool off and rest under a big oak tree. You sit down under the tree and see a brown wallet close by. Curiosity gets the best of you, and you open the waller. Interestinglyenough, you find credit cards, identification, and $300 in cash. Nobody else is around. What would you do?