1. Engineering
  2. Computer Science
  3. college of computer studies laboratory activity 42 arithmetic operators objective...

Question: college of computer studies laboratory activity 42 arithmetic operators objective...

Question details

COLLEGE OF COMPUTER STUDIES Laboratory Activity 4.2: Arithmetic Operators Objective: n this exercise we will write, compile and run a java program that will perform the diferent arithmetic operations Step 1: Create new java file using the text editor and name the program as Average. Step 2: Declare 5 variables inside the main method namely Math, English, Programming, Web Designing and Cisco with integer data type Step 3: Use the following data below in assigning value to each variable Math 85 o English 59 o Programming- 93 o Web Designing 80 Cisco-80 Step 4: Declare a variable named sum with a data type of double. This variable will store the ummation of grades of each subject S: Use the plus (+) operator to add up all the grades and store it in the variable mentioned n Step 4 Step 6: Use the slash U) operator to divide the accumulated sum of grades into the number of and store it in a variable named gpa with a d ata type of double ing System,out.printin, display the general average Step &: Save the file as Average-java 9: Using the javac command, compile the Average java Step 10: Run the java program using the java co command

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution