cs - output what is math math=input output what is reading...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Make a method for every function (ACT score converter, SAT score converter, GPA score converter) Make a method for each part (i.e., method for ACT, method for SAT, GPA, Intro text outputs) Example: Introduction() totalScore1=Applicant(1) totalScore2=Applicant(2) greaterThan(totalScore1,totalScore2) Applicant(i) Applicant i Double testScore=testType() Println(“exam score=+ round2( testScore)) Double gpa=findGPA() Println(“GPA score =” + round2(gpa)) Double totalScore=findTotalScore(gpa,testScore) return totalScore testType() output(“blah blah blah 1.)SAT or 2.)ACT?) testType= input from console if SAT (testType==1) testScore=findSATScore else (aka ACT score) testScore=findACTScore() return=testScore double findSATScore() output What is math math=input output what is reading rdg=input output what is writing writing=input testScore=calculateSAT(math, reading, writing) return testScore double findACTScore()---(these might be somewhat out of order?)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: output what is math math=input output what is reading rdg=input output what is English English= input Output what is science Science= input testScore=calculateACT(math, reading, English, science) return testScore double calculateACT(math, reading, English, science) testScore=equation for ACT return testScore double calculateSAT(math, reading, writing) testScore=equation for SAT return testScore double findTotalScore(gpa, testscore) totalscore=gpa+testscore return total score greaterThan(totalScore1,totalScore2) if totalscore1>2 applicant one is better else if totalscore2>totalscore1 applicant 2 is better else they are equal this was a quick algorithm. Its not perfect. Make sure to reference the cheat sheets on how to properly write methods with returns/if else statements. Also there are lectures online and the book if you get stuck. GOOD LUCK!!!!...
View Full Document

This note was uploaded on 11/05/2009 for the course HSTAA 401 taught by Professor Conway during the Spring '09 term at University of Washington.

Page1 / 2

cs - output what is math math=input output what is reading...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online