Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You are required, but not limited, to turn in the following source file:

Requirements to get full credits in Documentation

The assignment number, your name, StudentID, Lecture number(time), and a class description need to be included at the top of each file/class.

A description of each method is also needed. Some additional comments inside of methods (especially for a "main" method) to explain code that are hard to follow should be written.

New Skills to be Applied

In addition to what has been covered in previous assignments, the use of the following items, discussed in class, will probably be needed:

Documentation

Primitive Data Types

Basic I/O

Expressions

Conditional and Loop statements

Program Description

Assignment #2 will be the construction of a program that reads in an unspecified number of integers from standard input, performs some calculations on the inputted numbers, and outputs the results of those calculations to standard output. The numbers could be delimited by any kind of whitespace, i.e. tabs, spaces, and lines (Note that if you use the Scanner class, you do not have to worry about these delimiters.

They will be taken care of). Your program will continue to read in numbers until the number 0 is entered. At this point, the calculations will be outputted in the following format:

The minimum integer is 0

The count of integers is 1

The sum of positive integers is 0

The count of even integers in the sequence is 1

This means that using all numbers your program reads (including the last number 0), you need to compute the minimum, count how many numbers are read, compute the sum of positive integers (are greater than 0) and count how many even integers (can be divided by 2, "num%2 == 0") are in the sequence.

Note that the above is an output for the first test case. For other test cases, you will have different numbers.

Do not prompt to query for the numbers. The number 0 is included in the sequence of integers and should be included in all of your calculations.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93109751

Have any Question?


Related Questions in Computer Engineering

Suppose that two teams are playing a series of games each

Suppose that two teams are playing a series of games, each of which is independently won by team with probability p and by team B with probability 1-p. The winner of the series is the first team to win i games. (a) If i= ...

The probability of a potential employee passing a training

The probability of a potential employee passing a training course is 86%. If you selected 15 potential employees and gave them the training course, what is the probability that more than 12 will pass the test?

The inflation rate is 20 per year the real rate of return

The inflation rate is 2.0% per year. The real rate of return is 2.5% per year. A perpetuity that paid $100 this year will provide income that grows by the inflation rate. What is the value of the perpetuity?

Systems analysis project personal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

How to perform a regression for barrels sold vs us pop

How to perform a regression for barrels sold vs. US Pop. Write the estimated regression equation? The barrels sold are the dependent variables while US Pop is the independent variable.

In powerpoint what is beneficial about the usage or video

In Powerpoint, what is beneficial about the usage or Video, Audio, Animation, and Photos with Effects during presentation and work. What are some useful tools you found that would improve performance?

Arectangular box without a top has surface area 2500 cm2

A rectangular box without a top has surface area 2500 cm2 . The length x of its base is 18 cm longer that its width. (a) Use MATLAB's polynomial functions to express the volume V of the box in terms of x. (b) Plot V vs x ...

Question you have been hired as a security specialist by a

Question: You have been hired as a security specialist by a company to provide methods and recommendations to create a more secure environment for company data. Write a 1- to 2-page recommendation paper outlining methods ...

Tetrafluoromethane cf4 is a greenhouse gas synthesized by a

Tetrafluoromethane (CF 4 ) is a greenhouse gas synthesized by a violently explosive reaction between methane and fluorine. In joules, what is the average kinetic energy of a molecule of CF 4  at 57.2°C and 0.0010 atm?

Briefly explain what separations are how do they effect the

Briefly explain what separations are, how do they effect the average duration of unemployment?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As