Preview

CMIS 102 Homework 3

Satisfactory Essays
Open Document
Open Document
342 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
CMIS 102 Homework 3
Program Description - This program will allow a user to input their name and final grades from their courses and calculate their GPA accordingky. The amount of students as well as the amount of classes each student is taking, are undetermined.

Analysis – First I need to declare A, B, C, D, F and GPA as integers.
A = 4, B = 3, C = 2, D = 1, F = 0.
Each of these numbers will be floated
The program will ask for the name of the user
User Name: Stephen
The program will then ask for the grades.
Grades Entered: A,A,D
The letters corresponding to the integers will be summed ex. A+A+D = 4+4+1 = 9
The program will then divide the sum of the integers by the amount entered.
9/3 = 3.0 = GPA
The program will print the students name and their GPA
Name: Stephen GPA = 3.0

Test Plan -
Test Case #
Input
Expected Output
1
Steve: A,A,D
James: A,A,D,B
Chris: D,B,D,C
Kelly: F,A,C,C,D
Rick: D,C,C
Crystal: C,A,D
David: D,A,A,C,B
Kelsey: B,B,A,C,C
Laura: A,A,F
Marissa: D,D,A,B
GPA for Steve: 3.0
GPA for James: 3.0
GPA for Chris 1.75
GPA for Kelly: 2.25
GPA for Rick: 1.25
GPA for Crystal:1.75
GPA for David: 3.0
GPA for Kelsey: 2.8
GPA for Laura: 2.67
GPA for Marissa: 2.25

Pseudocode-
//Purpose: This program will allow students to input their name and grades to determine a GPA value
//Developer: Joe Metz
//GPA Calculator

//Variable Definition
Input=STUDENT_NAME, GRADES
Floats=GPA
Integers= NUM_OF_CLASSES, GRADE_POINTS,A,B,C,D,F
//Declare Integer Values
GRADE_POINTS= A=4, B=3, C=2, D=1, F=0
//Initiate Student Loop
For (students=0; students<10; students++)
Print “Enter Student Name”
User Input Student Name
//Reset sum to 0.0
Sum=0.0
Print “Input Grades”
User Input Grades
//Calculate Grade_Points
SUM=SUM_OF_GRADEPOINTS
//Calculate GPA
GPA=SUM/NUM_OF_CLASSES
Print “The GPA for “STUDENT_NAME” is “GPA”

Flowchart-

You May Also Find These Documents Helpful

  • Satisfactory Essays

    4.) Write assignment statements that perform the following operations with the variables a, b, and c:…

    • 453 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 4

    • 1142 Words
    • 5 Pages

    database of student grades so that only students who made an 85 or higher are displayed.…

    • 1142 Words
    • 5 Pages
    Good Essays
  • Better Essays

    CMGT578 Week2 Assignment

    • 822 Words
    • 3 Pages

    In this current IT technology driven age, companies whose primary core competency is not technology may have a difficult time operating and maintaining an IT environment that would give them a competitive advantage in the market place. A large company like Hess, whose mission statement is “…a global company devoted to exploring oil, gas and energy solutions”, would have a difficult time living it’s mission if it was too concerned with how to run their IT infrastructure and the impact it has on their marketing, sales, public relations, communications, and operations capabilities. However, each company must access their unique situation and environment to determine if IT outsourcing is the method going forward. There can be immense fiscal and operational benefits, but also significant risks.…

    • 822 Words
    • 3 Pages
    Better Essays
  • Satisfactory Essays

    Comp 122 Week 1 Ilab

    • 662 Words
    • 3 Pages

    4. Identify two test cases, one using whole number values, and one using decimal number values. For each of the two test cases show what inputs you will use and what your expected outputs should be.…

    • 662 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    UNIT 2

    • 470 Words
    • 3 Pages

    4.) Write assignment statements that perform the following operations with the variables a, b, and c:…

    • 470 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Problem 1:Input names of students from the user, terminated by ZZZ, andcreate a data file GRADES with records of the form:student (string), test1 (integer), test2 (integer), test3 (integer)In this file, all test scores should be set equal to 0.…

    • 194 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Assignment 201 Level 2

    • 504 Words
    • 3 Pages

    Share information, ask and reply to questions, keep up to date of any changes, feedback, build team work, be professional, makes a better atmosphere, better customer service and may prevent mistakes.…

    • 504 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    H. Name the passing score the threshold in cell B5 with the range name Passing. Display a message in the last grade book column based on the student’s semester performance. If a student earned a final score of 70 and higher, display Enroll n CS 202. Otherwise, display RETAKE CS 101.…

    • 472 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Lab 8 Student

    • 2441 Words
    • 15 Pages

    Step 4: Open either your Lab 6-4.rap flowchart or your Lab 6-4.py Python code. This program allowed a teacher to enter any number of test scores and then calculated the average score. Examine the program and identify at least two potential input errors.…

    • 2441 Words
    • 15 Pages
    Good Essays
  • Good Essays

    Psychology Assignment

    • 1556 Words
    • 7 Pages

    10. College XYZ wants to collect information from students concerning a plus/minus grading system (the college administration wants to add minus grades to the plus values…

    • 1556 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Palindrome

    • 1937 Words
    • 8 Pages

    PALINDROME #include <stdio.h> #include <string.h> int main() { char a[100], b[100]; printf("Enter the string to check if it is a palindrome\n"); gets(a); strcpy(b,a); strrev(b); if( strcmp(a,b) = = 0 ) printf("Entered string is a palindrome.\n"); else printf("Entered string is not a palindrome.\n"); return 0; } PRIME NUMBER OR NOT #include<stdio.h> main() { int n, c = 2; printf("Enter a number to check if it is prime\n"); scanf("%d",&n); for ( c = 2 ; c <= n - 1 ; c++ ) { if ( n%c == 0 ) { printf("%d is not prime.\n", n); break; } } if ( c == n ) printf("%d is prime.\n", n); return 0; } ARMSTRONG OR NOT #include <stdio.h> int main() { int number, sum = 0, temp, remainder; printf("Enter an integer\n"); scanf("%d",&number); temp = number; while( temp != 0 ) { remainder = temp%10; sum = sum + remainder*remainder*remainder; temp = temp/10; } if ( number == sum ) printf("Entered number is an armstrong number.\n"); else printf("Entered number is not an armstrong number.\n"); return 0; } OR #include<stdio.h> void main() { int num,num1,arms=0,rem; printf("Enter the number:\n"); scanf("%d",&num); num1=num; while(num>0) { rem=num%10; arms=arms+rem*rem*rem; num=num/10; } if(num1==arms) { printf("…

    • 1937 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Specify the class Admission giving details of the constructor, void fillArrray() and int binSearch(int, int, int). Define the main() function to create an object and call the functions accordingly to enable task.…

    • 777 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Programming Mini Project

    • 1010 Words
    • 5 Pages

    SOFTWare design FLOWCHART Start define SIZE 52 int getInput1(void); int getBalance(void); int dispData(void); int countAge(void); void getName(char first_name[10]); void getName2(char last_name[10]); int main(void) Declare num,ic, first_name[10],last_name[10], soal,i Print WELCOME TO Intelligence Tech ptd.ltd Main Menu:-) This smart card reader provides you some applications.…

    • 1010 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    printf("\n\n\t\tREAD THE FOLLOWING RULES CAREFULLY\n\n\n1.THE EXAMINATION IS FOR 3 SUBJECTS: PHYSICS, CHEMISTRY, MATHEMATICS\n\n2.EACH SUBJECT HAS 10 QUESTIONS EACH\n\n3.THE QUESTIONS ARE OF MULTIPLE CHOICE TYPE WITH 4 OPTIONS A, B, C, D OUT OF WHICH ONLY ONE IS APPROPRIATE\n\n4.+4 MARKS FOR EVERY CORRECT ANSWER AND A PENALTY OF -1 MARKS WILL BE AWARDED FOR EACH WRONG ANSWER\n\n5.YOU ARE ALLOWED TO QUIT ANYTIME IN BETWEEN BY PRESSING 'Q' ON THE KEYBOARD WHEREIN YOUR FINAL SCORE OUT OF 120 WILL BE DISPLAYED\n\n\n\n\n\n\n\n\t\t\tALL THE BEST!!!\n\n");…

    • 1021 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Dfd Files

    • 259 Words
    • 2 Pages

    The intent of our system is to help the Teachers or Professors of Asian Summit College to supervise the Grades of the student.…

    • 259 Words
    • 2 Pages
    Satisfactory Essays