Week 7 - Assignment

Week 7 - Assignment

Write a java program that takes the input from a file of numbers of type int and outputs the sum, count, and average of the numbers on the screen as shown in the example report below. The file contains nothing but numbers of type int. There are 10 records in the file, Num.dat. Instructions:

  1. Create a text file Num.dat

  2. Add 10 records in the file.

  3. Each record must be an integer.

Sum of the numbers is : =

Count of the numbers is : =

Average of the numbers is :=

Part 1. Write a program using for loops only. Part 2 Write a program using for loops and do while loops.

View Answers









Related Tutorials/Questions & Answers:
coursera machine learning week 7
coursera machine learning week 7  Hi, I am beginner in Data Science...: coursera machine learning week 7 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 7"
Tutorial of the week
Tutorial of the week Welcome to our Tutorials of the week section. We... tutorial using the mapping xml file(hbm.xml) for the week of Feb 1, 20010... for the week of Jan 25, 2010 Dojo is one of the powerful Ajax based programming
Advertisements
ModuleNotFoundError: No module named 'week'
ModuleNotFoundError: No module named 'week'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'week' How to remove the ModuleNotFoundError: No module named 'week' error
MySQL By Week
MySQL By Week       In this section, you will learn about the MySQL By Week. If you want to get some weekly reports of the table data you will use the sql week() function. Week
ModuleNotFoundError: No module named 'week-of-year'
ModuleNotFoundError: No module named 'week-of-year'  Hi, My Python... 'week-of-year' How to remove the ModuleNotFoundError: No module named 'week-of-year' error? Thanks   Hi, In your python
How to get day of week in Java?
How to get day of week in Java?  Hi, How to get day of week in Java... this class for getting the day of the week. Here is sample code: int weekday = calendar.get(Calendar.DAY_OF_WEEK); Check examples at Find the Day of the Week
How to learn Java programming in a week?
How to learn Java programming in a week?  Hi, I am in hurry to find job and want to learn Java quickly. I think after learning basics of Java I... to learn Java programming in a week? Thanks
Week calculate start from friday
Week calculate start from friday  My problem is to calculate how many... in May. 1st may is Saturday, it can not be considered the 1srt week of may, because the week starts on Friday. ADS_TO_REPLACE_1 Can anyone help me,...PLEASE
Get first day of week
Day of week: 7 Sunday... Get first day of week      ...; week in Java. As we know that GregorianCalendar provides the current date, month
mit 6 week ai course
mit 6 week ai course  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: mit 6 week ai... the topic "mit 6 week ai course". Also tell me which is the good training
coursera machine learning week 5
coursera machine learning week 5  Hi, I am beginner in Data Science...: coursera machine learning week 5 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 5"
coursera machine learning week 6
coursera machine learning week 6  Hi, I am beginner in Data Science...: coursera machine learning week 6 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 6"
coursera machine learning week 9
coursera machine learning week 9  Hi, I am beginner in Data Science...: coursera machine learning week 9 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 9"
coursera machine learning week 2
coursera machine learning week 2  Hi, I am beginner in Data Science...: coursera machine learning week 2 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 2"
coursera machine learning week 8
coursera machine learning week 8  Hi, I am beginner in Data Science...: coursera machine learning week 8 Try to provide me good examples or tutorials links so that I can learn the topic "coursera machine learning week 8"
Can I learn python in a week?
Can I learn python in a week?  Hi, I am beginner in Data Science... learn python in a week? Try to provide me good examples or tutorials links so that I can learn the topic "Can I learn python in a week?". Also tell me
Change Week Days Format
Change Week Days Format       This Example shows you how to change week days format. In the code given below we are change week days format. Methods used
Determining the Day-of-Week for a Particular Date
Determining the Day-of-Week for a Particular Date  ... in word i.e. the Day of Week for a particular date. Here, you can learn about the way.... This program gets the day of the week using Calendar.DAY_OF_WEEK i.e.
Week Days Format Example
Week Days Format Example       This example shows how to format week days using Format class. In this program we use a pattern of special characters to format week day
Find the Day of the Week
Find the Day of the Week      ... of a week from calendar. The Calendar class is an abstract base class that extends... The fields used:  DAY_OF_WEEK: This field is used to  get and set a day
PHP convert week number to days or month - PHP
PHP convert week number to days or month  Small, simple and easy code that can do following task: 1.Convert Week Numbers to Month 2.Convert Week to Date Generally, we use the date time object in PHP to convert the date
How to uninstall JDK 7?
How to uninstall JDK 7?  Hi, How to uninstall JDK 7 from Windows computer? Thanks   To uninstall JDK 7: Open Add remove programs in Windows 10/8/7 Then select the Java Development KIT Then click on the uninstall
Ajax in IE 7 - Ajax
Ajax in IE 7  My AJAX function does not update on IE 7. What can I do to solve this problem?  hai friend give cross browser compatability code for IE.that is //for other than IE browser if(window.XMLHttpRequest
PHP Date add 1 week
The PHP Date add 1 week example code. In the the following example code we will show you how to add one week to any date object in the PHP program. <?phpADS_TO_REPLACE_1 //Example to add 1 week to a date object
Windows 7 refresh DNS
Windows 7 refresh DNS  Windows 7 refresh DNS How to refresh DNS in Window 7/Windows and linux? Thanks   Hi, In windows it is very easy to refresh the DNS. go to the command prompt (dos prompt) and then issue
Butterfly Week Tour of Kerala
lodge in Periyar. Day 7 : DepartureADS_TO_REPLACE_1 As Butterfly Week Tour...Butterfly Week Tour of Kerala Destinations Covered: Cochin-Thattekkad-Munnar-Chinnar-Periyar Duration: 7 days and 6 nights Day 1: Kochi Sightseeing
java code 7
java code 7  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall.  
Java 7 Language Fundamentals
This tutorial describes basic language features of Java 7
Data Types in Java 7
In this section we will discuss Java 7 Data Types
Arrays in java 7
This tutorial describes the concept of Arrays in java 7
Operators in java 7
This tutorial describes the concept of operators in java 7
ModuleNotFoundError: No module named 'odoo10-addon-hr-timesheet-sheet-week-start-day'
ModuleNotFoundError: No module named 'odoo10-addon-hr-timesheet-sheet-week...: ModuleNotFoundError: No module named 'odoo10-addon-hr-timesheet-sheet-week-start...-hr-timesheet-sheet-week-start-day' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo8-addon-hr-timesheet-sheet-week-start-day'
ModuleNotFoundError: No module named 'odoo8-addon-hr-timesheet-sheet-week-start...: ModuleNotFoundError: No module named 'odoo8-addon-hr-timesheet-sheet-week-start-day...-timesheet-sheet-week-start-day' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo9-addon-hr-timesheet-sheet-week-start-day'
ModuleNotFoundError: No module named 'odoo9-addon-hr-timesheet-sheet-week-start...: ModuleNotFoundError: No module named 'odoo9-addon-hr-timesheet-sheet-week-start-day...-timesheet-sheet-week-start-day' error? Thanks   Hi
Switch Statement in java 7
Switch Statement in java 7 This tutorial describes the if statement in java 7. This is one kind of decision making statement. Switch Statements... -case statement to print the day of week. If day value is 1 then case 1
How to install JDK 7 in windows
How to install JDK 7 in windows  Hi, Is there any tutorial for installing JDK 7 on Windows computer here? Thanks   Hi, JDK 7... it in our video tutorial. Check the tutorial: Installing JDK 7 on Windows Thanks
install tesseract 4 on centos 7
install tesseract 4 on centos 7  Hi, I have centos 7 updated with the latest updates. Now I want to install tesseract 4 on centos 7. What is the command to install tesseract 4 on centos 7? Thanks   Hi
JEE 7 Tutorial
JEE 7 Tutorial JEE 7 is already released with many new features such as HTML 5... demanding enterprise applications. Here in this section we are giving JEE 7 tutorials explaining you the new features of JEE 7. You can use the latest version
Logical Operators in java 7
In this tutorial, we are going to discuss about logical operator in java 7
java classpath prbm in windows 7
java classpath prbm in windows 7  i have a problem to set the classpath in windows7 in my system oracle is not there. environment variables under that user variables i set them like this: CLASS .;C:\Program Files\Java\jdk1.6.0_32
How many hours a week does a data scientist work?
How many hours a week does a data scientist work?  Hi, I am beginner... to learn: How many hours a week does a data scientist work? Try to provide me... hours a week does a data scientist work?". Also tell me which is the good
Tomcat 7 in Eclipse Helios
Video Tutorial: Tomcat 7 in Eclipse Helios step by step This video tutorial shows you how you can configure Tomcat 7 in Eclipse Helios IDE. If you are looking for developing your application in Eclipse and test on the Tomcat 7 server
download eclipse helios for windows 7 64 bit
download eclipse helios for windows 7 64 bit  How to download eclipse helios for windows 7 64 bit? Thanks
Continue Statement in java 7
Continue Statement in java 7 In this tutorial we will discuss about continue statement in java 7. Continue Statement : Sometimes you need to skip block... statement in loops.ADS_TO_REPLACE_1 In java 7, Continue statement stops the current
Java SE 7
Java SE 7 Java SE was released on 28 July 2011. Its code name is Dolphin. It was first launched on 7 July 2011 but made available to general public on 28... is the list of new features added to the Java 7 : Java Virtual Support
If statement in java 7
If statement in java 7 This tutorial describes the if statement in java 7. This is one kind of decision making statement. There are various way to use if statement with else - If Statement :ADS_TO_REPLACE_1  If statement
Break Statement in java 7
Break Statement in java 7 In this tutorial we will discuss about break statement in java 7. Break Statement : Java facilitate you to break the flow of your program by using break statement. The break statement breaks the flow
Default value of path variable in Windows 7
Default value of path variable in Windows 7  Hi, In Windows 7 i... in the Windows 7?   Hi, The default value of the path variable in windows 7 is: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Master java in a week
Online Hibernate Training in one week - Just Rs. 1000
Get Trained in Hibernate in just one week Attention Java programmer!!! Learn Hibernate ORM framework in just one week through our instructor laid online... in just rupees 1000. Our our trainer will provide you one week online training

Ads