Introduction To Programming And Logic

Unit 1 Individual Project


Go Back

You have recently started an internship at a programming consulting firm, and one of your fellow interns is having a problem with his code. He hopes that you will be able to help fix his problems and finish the method.

Add comments to the specified file below that will help your fellow programmer understand what the program he is working on should do.

Click here to download the sample code to complete this assignment.

Please add your .zip file containing the commented program file.

Adhere to APA formatting and reference guidelines when writing your response. Additionally, your response should be free of grammatical errors, use complete sentences, and give specific details to support statements.



Here's How the Project Should Look.

package code_samples; /*This is a package in which this program resides

import java.util.Scanner;

public class Phase2_IP {

public static void main(String[] args) { // The purpose of this method is what? In this method you can write executable statements.

Scanner keyboard = new Scanner(System.in); // This line builds the variable keyboard to be an object using the scanner class. The keyboard object can now call any scanner methods

int num1, num2, num3; // It declares three integer variables called num1 to num3 for later use in the program

System.out.println("Enter first number: "); //This line of code enables the computer to process and display asking the user to enter the first number

num1 = keyboard.nextInt(); //Identifies first number entered using the keyboard

System.out.println("Enter second number:"); //This line of code enables *the computer to process and display asking the user to enter the *second number

num2 = keyboard.nextInt(); //Identifies second number entered using the keyboard

System.out.println("Enter third number: "); //This line of code enables *the computer to process and display asking the user to enter the third number

num3 = keyboard.nextInt(); // Identifies third number entered using the keyboard

System.out.println("The average of the numbers is " + ((num1 + num2 + num3) / 3)); // prints the average of the 3 numbers (using the average formula).

}

}


Created on June 11, 2014