0% found this document useful (0 votes)
35 views4 pages

Programming Tasks for IT Students

This document contains instructions for a preliminary assignment for a Computer Programming 2 course. It includes 4 problems to solve involving writing Java programs to calculate a student's GPA based on inputs, find the greatest of three numbers, classify a floating point number based on value, and determine the number of days in a month. The document provides sample inputs and expected outputs for each problem to test the programs. It notes the assignment should be saved as a file with the student's name and that it will be graded using a rubric.

Uploaded by

Sean Catapang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Programming Tasks for IT Students

This document contains instructions for a preliminary assignment for a Computer Programming 2 course. It includes 4 problems to solve involving writing Java programs to calculate a student's GPA based on inputs, find the greatest of three numbers, classify a floating point number based on value, and determine the number of days in a month. The document provides sample inputs and expected outputs for each problem to test the programs. It notes the assignment should be saved as a file with the student's name and that it will be graded using a rubric.

Uploaded by

Sean Catapang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Technological Institute of the Philippines

938 Aurora Blvd. Cubao, Quezon City

College of Information Technology Education

ITE 012 – Computer Programming 2

Preliminary Period
Fundamentals of Programming

Name: SURNAME, FIRSTNAME MI Date:


Program / Section: Instructor: Ms. Arceli F. Salo
Assessment Task: Assessment Task 1.1

Instruction:
- Save your work as SURNAME_PrelimAssign1.DOC (Ex. SALO_PrelimAssign1.DOC and .PDF)

Problem 1:
Write a program that will let the user enter: Student Name, two Course Code, two Course
Units, and two Course Grade. The program will compute and display the student's General Weighted
Average(GWA).
1. Variables: studName, cCode1, cCode2, cUnit1, cUnit2, cGrade1, cGrade2, totUnits, gwa=0.
2. Formula: totUnits=sUnit1 + sUnit2
3. gwa= ((cGrade1*cUnits1)+( cGrade2*cUnits2))/ totUnits

SAMPLE OUTPUT
Name: Alyssa Marie Santos
Section: IT12S1

Enter student name: Alyssa Marie Santos


Enter course code 1: ITE012
Enter course unit 1: 4
Enter course grade 1: 95

Enter course code 2: ITE001


Enter course unit 2: 3

Enter course grade 2: 97


Your General Weighted Average is 1.00

Problem 2:
Take three numbers from the user and print the greatest number.

Test Data
Input the 1st number: 30
Input the 2nd number: 83
Input the 3rd number: 92

Expected Output :
The greatest: 92

Problem :. Write a Java program that reads a floating-point number and prints "zero" if the number is zero.
Otherwise, print "positive" or "negative". Add "small" if the absolute value of the number is less than 1, or
"large" if it exceeds 1,000,000.
Test Data
Input a number: 25

Expected Output :
Input value: 25
Positive number

Problem 4:
Write a Java program to find the number of days in a month.
Test Data
Input a month number: 2
Input a year: 2016

Expected Output :
February 2016 has 29 days

Assessment Tool:
This assessment will be graded using Rubric for Essay

Answer:
PROB1:
PROB2:
PROB3:

PROB 4:

“affirm that I shall not give or receive any unauthorized help


on this assignment and that all work is my own”

You might also like