Free Essay

Homework 2

In: Computers and Technology

Submitted By memphisk
Words 796
Pages 4
Kenneth jones
CMIS 102
15 February 2015

Pseudo code
/*
This is a pseudo code for calculating the GPA for students each registered for different no of courses */
CalculateStdntGpa (int NoStudents, int NoCourses, char StudentNames[],char CourseGrade[])
//INPUT: No of students, Name of students, No of courses and Grades for each course
//OUTPUT: The GPA for each student

for(int i = 0: i < NoStudents: i++){ StudentNames[i] <- StdntName; for(int j=1: j<= NoCourses: j++){ if(CourseGrade = ”A”){ GradePoint <- 4; } if(CourseGrade = ”B”){ GradePoint <- 3; } if(CourseGrade = ”C”){ GradePoint <- 2; } if(CourseGrade = ”D”){ GradePoint <- 1; } if(CourseGrade = ”F”){ GradePoint <- 0; }

GradePoints[j-1] <- GradePoint; } Return GPA
}

1. Analysis
The following is a brief analysis of the program being built * Inputs
The inputs for the program are: I. No of students which should be an integer value to hold the number of students II. Names for students which would be an array structure to hold all student names. This array would be of data type character III. No of courses for each student which is of data type integer IV. Grade for each course registered by each student which is an array of data type character

* Data processing
The program takes the inputs discussed in details above and processes them by evaluating the value of each respective grade using for-loops, after which summation is done to find the GPA for each student by dividing the total values for grades by the number of courses registered by each student. * Outputs
The expected outcome for the program is the Average Grade Points for each student which is the GPA whose data type would be appropriate as double since it’s an average of the total grade values for each course registered by a student. * Variable definitions
The data types for data to be processed by the program include I. Integer: these include the no of students, No of courses registered by each student II. Double: include data like the average GPA points for each student III. Character: include data like the students’ name and Grades

* Formulas and sample calculations
Mainly the formula for calculating average is essential here as the average of GPA points is necessary:
GPA = (p1 + p2 + P3)/3 where p is the points

2. Flow chart
Flowchart for Program CalculateStdntGpa()

Start
Start

Prompt for no of students
Prompt for no of students

Enter no of students
Enter no of students

Loop for no of students
Loop for no of students

Loop for no of courses
Loop for no of courses

Prompt for no of courses
Prompt for no of courses

Enter no of courses
Enter no of courses

Output GPA for each student
A=4,B=3,C=2,D=1,F=0

Output GPA for each student
A=4,B=3,C=2,D=1,F=0

Stop
Stop

Prompt for Grades
Prompt for Grades

Enter Grades
Enter Grades

3. Program
/*
This is a C program that calculates each student’s GPA for registered courses
*/
// preprocessor directive to include input output functions in the header file
#include<stdio.h>
void main(){ // main function to perform the tasks

// variable declaration
Int NoStudents;
Int NoCourses;

Double GPA;
Char StdntName;
Char CourseGrade[];
Char StudentNames[];
// prompt to specify number of students printf(“Specify No of students”); scanf(“%d”, &NoStudents); // Capture number of students
/* loop for capturing student names into an array. it loops the no of times as of the students*/ for(int i = 0: i < NoStudents: i++){ scanf(“%c”, &StdntName); // Capture students name
StudentNames[i] = StdntName; // Capture each student’s name into an array
//prompt for specifying no of courses for each student printf(“Specify No of Courses for %s”, StudentName[i]); scanf(“%d”, &NoCourses); // Capture no of courses for each student

// loop for capturing grades according to the no of courses each student takes for(int j=1: j<= NoCourses: j++){ scanf(“%c”, &CourseGrade); // capture all student’s grades each at a time
// if statement for assigning value to each grade for each course for each student if(CourseGrade = ”A”){ StudentCourseGrades[j-1] = 4; // assigns value 4 to the grade A Else if(StudentCourseGrades[j-1] = ”B”) StudentCourseGrades[j-1] =3; // assigns value 3 to the grade B

Else if(StudentCourseGrades[j-1] = ”C”) StudentCourseGrades[j-1] =2; // assigns value 2 to the grade C Else if(StudentCourseGrades[j-1] = ”D”) StudentCourseGrades[j-1] =1; // assigns value 1 to the grade D Else if(StudentCourseGrades[j-1] = ”F”) StudentCourseGrades[j-1] =0; // assigns value 0 to the grade F
/* Summing up values for each grade, one after the other, then dividing the sum by total no of courses for each student */ GPA=( StudentCourseGrades[j-1] + StudentCourseGrades[j] ) / NoCourses; } } printf(“GPA for %s is: %d

Similar Documents

Free Essay

Mat 510 Week 2 Homework Assignment 2

...MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 To purchase this visit following link: http://www.activitymode.com/product/mat-510-week-2-homework-assignment-2/ Contact us at: SUPPORT@ACTIVITYMODE.COM MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 MAT510 Homework Assignment 2 Strayer Due in Week 2 and worth 30 points Answer the following questions in the space provided below: Explain the importance of variation to health-care organizations and answer the following questions. 1. a. What might be the key processes for health-care organizations? 2. b. key processes of health-care organizations What are the potential common causes of variation that would have an impact on the? 3. c. What special causes might be more important than the others? 4. d. How might health-care organizations’ business environment be dynamic and change over time? Activity Mode aims to provide quality study notes and tutorials to the students of MAT 510 Week 2 Homework Assignment 2 in order to ace their studies. MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 To purchase this visit following link: http://www.activitymode.com/product/mat-510-week-2-homework-assignment-2/ Contact us at: SUPPORT@ACTIVITYMODE.COM MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 MAT510 Homework Assignment 2 Strayer Due in Week 2 and worth 30 points Answer the following questions in the space provided below: Explain the importance of variation to health-care organizations and answer the following questions. 1. a. What might...

Words: 1631 - Pages: 7

Free Essay

Mat 510 Week 2 Homework Assignment 2

...MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 To purchase this visit following link: http://www.activitymode.com/product/mat-510-week-2-homework-assignment-2/ Contact us at: SUPPORT@ACTIVITYMODE.COM MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 MAT510 Homework Assignment 2 Strayer Due in Week 2 and worth 30 points Answer the following questions in the space provided below: Explain the importance of variation to health-care organizations and answer the following questions. 1. a. What might be the key processes for health-care organizations? 2. b. key processes of health-care organizations What are the potential common causes of variation that would have an impact on the? 3. c. What special causes might be more important than the others? 4. d. How might health-care organizations’ business environment be dynamic and change over time? Activity Mode aims to provide quality study notes and tutorials to the students of MAT 510 Week 2 Homework Assignment 2 in order to ace their studies. MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 To purchase this visit following link: http://www.activitymode.com/product/mat-510-week-2-homework-assignment-2/ Contact us at: SUPPORT@ACTIVITYMODE.COM MAT 510 WEEK 2 HOMEWORK ASSIGNMENT 2 MAT510 Homework Assignment 2 Strayer Due in Week 2 and worth 30 points Answer the following questions in the space provided below: Explain the importance of variation to health-care organizations and answer the following questions. 1. a. What might...

Words: 1631 - Pages: 7

Premium Essay

Homework 2

...Anti-Discrimination within The Workplace Erik Ortega BUS 670 Legal Environment Professor David MacKusick August 20, 2015 Many employers are facing the difficult challenge of bringing and recruiting employees that are excellent performers. Most of the companies of today still continue to post vague, bland, and uninteresting job descriptions in the hopes that they will land them a candidate who is the ideal fit for the position and the company as a whole. Having a full recruitment strategy in place eliminates any potential risk when deciding who to employ and bring into your professional life (Caan, 2015). Companies want to hire top performing employees, but most are not aware of strategic and effective ways to help avoid violating any anti-discrimination and other employment law. As (Caan, 2015) states “After shortlisting the final candidates, I like them to carry out a practical task, such as doing a presentation or preparing a report. This is a great way to show whether their bark is bigger than their bite, or if they really do have the goods to deliver on their interviews.” These are some significant tasks that need to be understood and used in a strategic manner to help ensure that the hiring process will attract the best candidate to fill the position. In this paper, I will be preparing an advertisement for the position that my hiring manager is hiring for. In this advertisement, I will be providing the job description, description of duties, and a......

Words: 1425 - Pages: 6

Premium Essay

Homework 2

...What did I learn from this class? Well for one, I understand how IT fits into the overall budget of an organization and I now know that it’s not easy, it’s not cheap by far, but nevertheless it is essential. It’s important to understand a company’s overall technology goals before developing a budget. If technology is integral to the business operations, then the level of spending required will likely be substantial. Ironically, the size of a business doesn’t necessarily determine the level of spending required. It’s determined solely on the type and scope of technology needed to support the overall goals. Does the company want technology to improve IT accessibility for its staff? Is the company looking to improve its ability to respond to customers’ needs? The overall goal for implementing technology plays an important part in defining an IT budget. Once an IT team gets past that, now comes the fun part, NUMBERS. These numbers need to be frugal enough to get the budget approved, however costly enough to get the essentials covered. I also understand the concepts of total cost of ownership and I must say that in my opinion, the total cost of ownership is the single most important principle in all of supply chain management. It quantifies and measures costs and of course, ownership brings purchase costs, but ownership can also bring substantial costs for installing, deploying, operating, upgrading, and maintaining the same assets. For many kinds of acquisitions, the (tco)......

Words: 935 - Pages: 4

Premium Essay

Homework 2

...Color is a complex experience for humans because we all experience it in different ways. For instance, those who are color-blind will not experience color in nearly the same way as those who are not, and I feel sure that there are gradations of how people experience color from the extreme of color-blindness to full visualization of color nuances. Even within the concept of color, there are three different categories to consider:  hue, value, and intensity. To have a full-on discussion of the use of color in art, you have to be conversant about the basic color (hue), value (the amount of black or white added to the basic color), and intensity (the amount of basic color the artist chooses to use in his/her medium). Even then, you can go further and discuss the impact of opacity, translucency, and transparency on color. Color is a convoluted experience for humans because we all experience it in disparate ways. For instance, those who are color-blind will not experience color in nearly the alike method as those who are not, and I sense sure that there are gradations of how people experience color from the great of color-blindness to maximum visualization of color nuances. Even inside the believed of color, there are three disparate groups to consider: hue, worth, and intensity. To have a full-on discussion of the use of color in fine art, you have to be familiar concerning the frank color (hue), worth (the number of black or white added to the frank color), and intensity (the......

Words: 409 - Pages: 2

Premium Essay

Module 2 Homework

...Module 2 Homework Risk Management and Health Care Regulations Angie Martinez Grand Canyon University Module 2 Homework 1) There are several processes involved in a wrongful discharge. This is a fairly new and quickly expanding area that involves litigation, and this is an area that employers would rather avoid. About 65%-70% of worker’s are thought to be employees at will which means that an employer may fire an employee at any time for any reason, as long as the reason is lawful (Kavaler & Spiegel, 2003, p. 57). In order to avoid litigation employers push for arbitration to assist in settling cases. State laws determine if arbitration is allowed (Kavaler & Spiegel, 2003, p. 58). The risk management director will explore whatever legal avenues available to prevent litigation. Employers must keep a paper trail for problem employees that way if an employee gets fired; it will be considered fair because there is documentation. This is a part of due process. To simplify due process, it basically means steps that have to be followed before an employee can be terminated. It is the job of human resources to ensure that each and every step is followed. In a court case the employee will most likely win if due process is not followed. Due process is coupled with progressive disciplinary procedures (Grand Canyon University). There is only one way of avoiding wrongful dismissal, it is to do the right thing. 2) Three diverse discrimination theories lie beneath the......

Words: 1861 - Pages: 8

Premium Essay

Chapter 2 Homework

...Alethia St. John Chapter 2 Homework PMGT 385 May 27, 2015 The Bill & Melinda Gates Foundation (Case Study) Bill and Melinda Gates are the co-chairs and trustees of the Bill and Melinda Gates Foundation. Their foundations provide grants to other organizations to give people the chance at healthy and productive lives that they wouldn’t have if not for the help of The Bill & Melinda Gates Foundation. Bill and Melinda Gates have personality traits for each of the Big Five dimensions. Bill and Melinda show surgency personality dimensions. Specifically they demonstrate extraversion and high energy with determination. They are outgoing with the public and people within their foundation. They are also determined to make a difference and they not only talk-the-talk but they also walk-the-walk. They have been working towards achieving their goal of donating 95 percent of their net worth in their lifetime that will be about $100 billion. Bill and Melinda also show agreeableness. Specifically they show traits of sociability/sensibility and emotional intelligence. Melinda and Bill strive on building social relationships with the needy people around the world. Their sensitivity to help and make a difference in individuals lives that cant help themselves due to lack of money and resources is admirable. They are aware of the world around them that they could otherwise ignore because other than mentally they are not directly affected by it. Bill is avidly involved with his......

Words: 1037 - Pages: 5

Free Essay

Lkhjsadkjhs

...CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration ACCY 1-11 – Fundamentals of Financial Accounting SYLLABUS / Fall 2015 PROFESSOR: Behrooz Amini, MBA, MA, CPA OFFICE: TAH-2121 OFFICE HOURS: T/R: 10:45 to 11:30 am, and by appointment OFFICE PHONE: 916-278-7154 (No voice mail available) E-MAIL: amini@csus.edu The most effective and efficient way to communicate. Class Days, Time, and Room T / R, 9-10:15 am, Amador Hall - 152 Course Description: Accounting as the basis of an information system with emphasis on concepts and assumptions underlying data accumulation for financial reports. It includes the concepts of income determination, cash flow position, financial position, and accounting for various types of ownership equities ( a corporation emphasis). Course Objectives: After successfully completing ACCY 1, you should have the basic knowledge and understanding of a company’s (a corporation emphasis) financial and economic resources. You should also be able to analyze and interpret the results of operations, cash flow situation, and the financial position. Prerequisite: Entry Level Math (ELM) test of at least 36, and fair knowledge of Excel. Required Textbook: Financial Accounting, 3nd Edition, Spiceland / Publisher: McGraw Hill (Loose-leaf pages) with Connect+ Access /ISBN#: 9781259757099 • Connect log-in: ......

Words: 2428 - Pages: 10

Free Essay

The Dropout Crisis

...Department of Humanities, Sciences, Social Sciences and Health Sciences (310) 825-0641 Quarter: Fall Introduction to Macroeconomics Economics XL 2 249857, 253182 4 Units Instructor: Mark Dwyer, Ph.D. Dates: 30 September, 2014 through 16 December, 2014 (Fall Session) Days/Time: Each week will begin on Tuesday, though students may work ahead if they wish. Prerequisites Working knowledge of basic algebra Course Description Welcome Welcome to Principles of Economics XL2 - Macroeconomics. I look forward to working with you and I hope and expect that you will find this online class rewarding and thought provoking. After reading this syllabus, please go to the Introductions Forum of the Discussion Board and reply to the first post there with a brief introduction of what you hope to gain from the course and your prior exposure to economics. While we will make extensive use of the text Principles of Economics for this course, also we will visit and discuss online sources that apply or expand upon the microeconomic methods discussed in the text. If you have technical questions, please feel free to contact Technical Support. You can also contact me through the email feature in the class. I hope you have a great learning experience! Overview This is an introductory course in the principles of macroeconomics. I am looking forward to introducing you to some of the models economists use to understand and predict how national economies react to the decisions made by......

Words: 4056 - Pages: 17

Premium Essay

Private Tutions

...The practice of giving private tuitions and teaching students in coaching classes in shifts is increasing day by day in India. The parents of the Indian boys and girls are mostly of the view that their wards can only get better knowledge only by tuitions and different coaching classes, which are generally run of the working teachers of colleges, universities and unemployed educated youth. It is my personal experience that even teachers teaching in lower classes i.e. from primary to junior high school advise the parents of the students that their wards could only get through in home examinations and would be able to secure good marks if are taught by their own teachers, either way of tuitions or coaching. The candidates preparing for different competitive examinations are lured by different coaching institutions. The main aim of these coaching institutions is to earn maximum profit and they do not care to educate the candidates to acquire detailed knowledge of subjects. These institutes only prepare the candidates keeping in view the fourth coming examinations. PRIVATE TUTIONS: ADVANTAGES AND DISADVANTAGES Parents are worried that their children are unable to cope with school work. As such, they hire private tutors to coach them or send them to tuition centers for extra lessons. Private tuitions can be advantageous. Sometimes students are unable to concentrate during lessons for various reasons, such as distractions, not feeling well or explanation gaps. Therefore,......

Words: 931 - Pages: 4

Premium Essay

It Is Just About Me, Not Really Good at All

...Name: Nguyen Thu Trang Class: 14E12 _____________________________________________________________ WRITING ASSIGNMENT Version 01 Task: To what extend do you agree with the statement: “School is bad for students?” Support your claims with appropriate grounds and warrants. People may think that children must go to school; thus, almost children go to school every day (this sentence has a problem in how you express the idea) However, arguments have persisted as to whether school is good (can be replaced by 'beneficial') for children or not. Although there are convincing argument on both sides, I strongly believe that it is bad for children because school not only prevents children’s creativeness, but also has negative impacts on children’s (their) health. Most of (omit) educators claim that school is encouraging children to be individual and different (how does school encourage children to be individual and different? I think you should clarify this a little bit); nevertheless, it is a fact that school is crushing (stifle/ inhibit) kids’ creativeness ( can replaced by 'creativity' to avoid repetition) by asking almost (virtually) all of them to do the same things and not accepting creative children’s characteristics. The majority of students are cast in the same mould made by educators, thinking that model is standard for people who children will be. (express in a clearer way). These acts (not suitable) are the root of being not interested in exploring new ideas or...

Words: 1122 - Pages: 5

Free Essay

Week 2 Homework

...Homework IT Governance and COBIT framework Yeng Lee SEC 592 Professor Joseph Costantini May 18, 2014 What is the relationship between IT execution and IT governance? IT execution and IT governance are both related to the development of Information Technology. The differences among the two terms are their purpose and process. IT execution is a phase in IT development where IT governance is policies and rules to a project. In other word, IT governance is a whole single identity while IT execution is a step in a project. We will go further detail of the different of the two terms. But first, we will elaborate the term IT execution and IT governance. As stated above, execution is a phase in a project. IT execution usually comes after analyzing and planning phase of a project. Following the execution phase will be testing, clean up, and monitoring. In the execution or a project, it requires setting up responsibilities, time management, authorities, and control mechanism to accomplish the task. We will see later how governance does this IT execution. In the Execution phase, the project is carry out and complete. In the field of Information Technology, it can be anything from connecting a new network to upgrading an existence application or hardware to implementing security policies. As the project is being developed, executioner must refer back to the planning phase for guidance and error checking (Project Execution Phase, n.d.). Governance is the......

Words: 1112 - Pages: 5

Premium Essay

Class Homework 2

...Student Name | Karla Hayes | Course and Section Number | Program of Study | FIN 1103 | Business Administration | Personal Finance FIN 1103 Week 4 Individual Work Money Management Assignment Instructions | To complete this assignment: 1. Answer all of the questions below in the space provided. 2. Reflect on the information presented in this week’s lesson and provide an insightful response to each question writing no more than two paragraphs. | Save and Submit to Dropbox | 1. Save your work as a Microsoft Word 2010 (.docx) file that includes your name, course code, and title in the file name. For example: JaneSmith_FIN1103_Week4.docx. 2. To submit your assignment, go to the Dropbox and click "Submit Assignment." 3. Click on the drop-down menu to select the Week 4: Individual Work basket in the Dropbox. | Objective: Outline the types of savings plans and calculate some of the related interest rates and account costs Locate the Financial Planning Exercises on page 166-167 of your textbook. Financial Planning Exercise Case 2: Victor and Maria Hernandez Need to Save Money Fast | The Hernandez family is experiencing some financial pressures, even though the couple has a combined income of $66,000. Also, their eldest son, Joseph, will start college in only three years. Maria is contemplating going to work full time to add about $25,000 to the family’s annual income. | a. How will this change in income affect the family’s emergency......

Words: 409 - Pages: 2

Premium Essay

Nbt 1

...NBT 1 Task 1 In scenario 2, Mr. Collet encourages positive social interaction by allowing some of the homework assignments to be developed by the class as they go along. In the 7th and 8th grade students are becoming more social and this gives them to opportunity to work together to come up with creative homework solutions. This not only allows them to be engaged in the class but also with each other and keeps a relaxed and pleasant work environment (Wong, 1998). Mr. Collet also encourages self-motivation by having the students keep a day planner and to be responsible for copying their homework assignments down rather than having it handed to them. In the 7th and 8th grade students begin preparing for college and by teaching them early to set aside study time by keeping a planner builds good habits for the rest of their education (Savage, 2009). They have a concrete manner in which to copy homework assignments but also to manage their free time which may be less and less as they get older and participate in more activities. Mr. Collet encourages active engagement in his class by working with the students on their day planner, picking up and turning in assignments on time and by giving them an opportunity to dispute and grading mistakes. In the 7th and 8th grade students are becoming more independent and building study skills that they will use later on. By working with them on their day planners, the teacher can show the students how to manage their time. ......

Words: 435 - Pages: 2

Premium Essay

Good

...200 Administrative Assistant: Bree Miller KRAN 443 496-7964 (9 a.m. – 1 p.m. M-Th) bree2@purdue.edu Course Web Site(s): blackboard.purdue.edu (for accessing grades and course information or postings) www.pearsonmylabandmastering.com (for e-text, online homework, study guide) Course Overview: Econ 251 is intended to introduce you to microeconomic theory and its application in everyday life. The course will explain how individual consumers and producers together determine the prices and quantities of goods available in the marketplace. We will investigate the underlying incentives of consumers to buy goods and of firms to produce products that satisfy consumer demand. In addition, we'll look at how government can help or hinder market efficiency. The textbook for the course is Microeconomics for Economics 251, published by Pearson Custom Publishing (ISBN: 1256128546). The publisher has created an online resource site for this class, Pearson MyLab, which you will use for completing several homework assignments. An e-text is available with the online site as well. All homework will be submitted and graded online. Estimated Course Schedule: Date Topic January 10 & 12 Chapter 1: What Is Economics? Chapter 2: The Economic Problem January 17 & 19 Chapter 3: Demand and Supply January 24 & 26...

Words: 1729 - Pages: 7