Questions
Write a C program that, given a file named Program_2.dat as input, determines and prints the...

Write a C program that, given a file named Program_2.dat as input, determines and prints the following information:

  1. The number of characters in the file.
  2. The number of uppercase letters in the file.
  3. The number of lowercase letters in the file.
  4. The number of words in the file.
  5. The number of lines in the file.

Your program should assume that the input file, Program_2.dat, may contain any text whatsoever, and that text might be, or might not be, the excerpt from A Tale of Two Cities shown below.

  • Your program's input and output must look as much as possible like the sample run shown below (including, but not necessarily limited to, wording, punctuation, horizontal & vertical spacing, and indentation).

Assume that the program will be tested  using gcc (GCC) 8.2.0.

Sample Run # 1

When file Program_2.dat is present in the current working directory.

        Program_2_jeffsolheim.c  14 FEB 2019

        This program reads text from Program_2.dat and determines:

                1.  The number of characters in the file.
                2.  The number of uppercase letters in the file.
                3.  The number of lowercase letters in the file.
                4.  The number of words in the file.
                5.  The number of lines in the file.

        The file Program_2.dat contains:

                631 characters

                4 uppercase letters

                471 lowercase letters

                119 words

                17 lines

Sample Run # 2

When file Program_2.dat is not present in the current working directory.

        Program_2_jeffsolheim.c  14 FEB 2019

        This program reads text from Program_2.dat and determines:

                1.  The number of characters in the file.
                2.  The number of uppercase letters in the file.
                3.  The number of lowercase letters in the file.
                4.  The number of words in the file.
                5.  The number of lines in the file.

        Error! Failed to open Program_2.dat!

Sample Input File

It was the best of times,
it was the worst of times,
it was the age of wisdom,
it was the age of foolishness,
it was the epoch of belief,
it was the epoch of incredulity,
it was the season of Light,
it was the season of Darkness,
it was the spring of hope,
it was the winter of despair,
we had everything before us,
we had nothing before us,
we were all going direct to Heaven,
we were all going direct the other way--
in short, the period was so far like the present period, that some of
its noisiest authorities insisted on its being received, for good or for
evil, in the superlative degree of comparison only.

In: Computer Science

Write a Java program called Numbers that reads a file containing a list of numbers and...

Write a Java program called Numbers that reads a file containing a list of numbers and outputs, for each number in the list, the next bigger number. For example, if the list is

78, 22, 56, 99, 12, 14, 17, 15, 1, 144, 37, 23, 47, 88, 3, 19

the output should look like the following:

78: 88

22: 23

56: 78

99: 144

12: 14

14: 15

17: 19

15: 17

1: 3

144: 2147483647

37: 47

23: 37

47: 56

88: 99

3: 12

19: 22

NOTE: If there is no bigger number in the sequence, just display the value of Integer.MAX_VALUE .

The output should be shown on the screen and also saved in a file.

Program Design

  • You should have a single class called Numbers.
  • You should have a static method called nextLargest, which takes as input an array of integers called list and another single integer called value. It should return the number that is the next larger than the value in the list (as described above). You need to use this method to implement your program.
  • The input file from which the list is read should be called "list.txt". Assume it's in the current directory.
  • The output file to which the results should be saved should be called "nextlist.txt". Save it in the current directory (i.e. don't specify the path).

Additional Requirements

  1. The name of your Java Class that contains the main method should be Numbers. All your code should be within a single file.
  2. Your code should follow good coding practices, including good use of whitespace (indents and line breaks) and use of both inline and block comments.
  3. You need to use meaningful identifier names that conform to standard Java naming conventions.
  4. At the top of the file, you need to put in a block comment with the following information: your name, date, course name, semester, and assignment name.
  5. If the input file contains something not in the proper format, your program should handle this gracefully by displaying an appropriate message to the user and closing the program (without letting it crash).

The output of your program should exactly match the sample program output given at the end

In: Computer Science

Explain the pro-choice argument that an early stage fetus cannot technically have a right to life....

Explain the pro-choice argument that an early stage fetus cannot technically have a right to life. Explain the pro-life response based on the potentiality argument. Are there any weaknesses to the potentiality argument? Describe the "woman's rights" pro-choice argument. Are there any weaknesses to this argument?

In: Psychology

As a nurse explain the importance of these. 1.Health promotion and maintenance, including early detection 2.Illness...

As a nurse explain the importance of these.

1.Health promotion and maintenance, including early detection

2.Illness prevention

3.Diagnosis and treatment

4.Rehabilitation and long-term care

5. Secondary care services

6. Tertiary care service

7. Quaternary care

In: Nursing

how to Calculate monthly stock return volatility and monthly turnover ? How return volatility is associated...

how to Calculate monthly stock return volatility and monthly turnover ?

How return volatility is associated with turnover? Suppose in early January 2018 you start investing in one (and only one) of the two stocks and sell in 3 months, which stock you choose?

In: Accounting

The construction industry is evolving towards greater use of integrative construction procurement strategies such as design...

The construction industry is evolving towards greater use of integrative construction procurement strategies such as design and build, early contractor’s involvement, and/or turnkey contract: (a) Discuss any limitations in the cost planning process against the backdrop of a construction industry that adopts a more integrative construction approach.

In: Finance

1. Summarize the growth and development in the Infant 2- Summarize the growth and development in...

1. Summarize the growth and development in the Infant

2- Summarize the growth and development in Early Childhood

3- Compare and contrast 2 theories/theorists of Growth & Development

4- Discuss Prenatal Influences on Healthy Development and any public or social program available to pregnant women

In: Nursing

How did the art of early-twentieth-century artist Marcel Duchamp influence  contemporary Conceptual art? Compare Duchamp’s Bicycle...

How did the art of early-twentieth-century artist Marcel Duchamp influence  contemporary Conceptual art?

Compare Duchamp’s Bicycle Wheel or Fountain to the work of Hans Kosuth in One and Three Chairs.

What comparisons that can be made between Dada and Conceptual art?

In: Other

give your theory or idea on why time is 24 hours, why are their 60 minute's...

give your theory or idea on why time is 24 hours, why are their 60 minute's in an hour and 60 seconds in a minute. Why did early civilizations pick these particular numbers for time. Give your response with a paragraph explaining your theory, idea and or argument.

In: Other

Consider the physical and psychosocial aspects of puberty. What is happening physiologically that is impacting behavior...

Consider the physical and psychosocial aspects of puberty. What is happening physiologically that is impacting behavior during puberty? What do you think is the hardest thing for young teens to adjust to during this transitional time? What are the possible causes and outcomes of early development in boys and girls?

In: Psychology