HW5(50pts) The homework Due on April 14, 23:59:59

Slides:



Advertisements
Similar presentations
Meeting of the Minds 1999 Welcome To... ReportSmith & ADP PC/Payroll For Windows.
Advertisements

 Given a matrix of size N x N and some operations of rotation or reflection, determine the final state of the matrix.  The operations can be: ◦ Rotate.
Part 2.  Arrays  Functions  Passing Variables in a URL  Passing variables with forms  Sessions.
Homework #2: Functions and Arrays
Conservation of Energy
TA: Nouf Al-Harbi NoufNaief.net :::
COMP171 Data Structure & Algorithm Tutorial 1 TA: M.Y.Chan.
C++ data types. Structs vs. Classes C++ Classes.
1 Lab Session-5 CSIT221 Spring 2003 Default and Parameterized Constructors Destructors Programming Exercise for building a template based class (demo required)
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Java Programming Practice.
Constructors A constructor is a method that creates an object in Java. It does not return anything and it is not void. It’s only purpose is to create an.
Quiz Answer These Questions To Test Your Knowledge! Click The Large Play Button To PLAY! Play.
Options for User Input Options for getting information from the user –Write event-driven code Con: requires a significant amount of new code to set-up.
1 Interactive Applications (CLI) Interactive Applications Command Line Interfaces Project 1: Calculating BMI Example: Factoring the Solution Reading for.
CS 31 Discussion, Week 4 Faisal Alquaddoomi, Office Hours: BH 2432, MW 4:30-6:30pm, F 12:30-1:30pm (today)
Lesson 2: Relations and Functions, Domain and Range and Mapping Unit 1: Functions Lesson 2: Relations and Functions, Domain and Range and Mapping.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved COS240 O-O Languages AUBG,
Java Classes Using Java Classes Introduction to UML.
Introduction to PASS, and Exercises on Operators and Basic I/O.
Lesson 1: Relations and Functions
1 nd Semester Module3 Selection Statement Thanawin Rakthanmanon Create by: Aphirak Jansang Computer Engineering Department.
Contract based programming Using pre- and post-conditions, and object invariants Contract based programming1.
Homework #3: Classes and Constructors
Chapter 3: Developing Class Methods Object-Oriented Program Development Using Java: A Class-Centered Approach.
Homework #4: Operator Overloading and Strings By J. H. Wang May 8, 2012.
Warm-Up 1/28/15 1)Place homework in basket. 2)Basil babies. 3)Meet in your groups of three or four and finish writing out possible questions for macronutrients.
Functions Reusable Parts of Code SoftUni Team Technical Trainers Software University
How to Calculate Your Body Mass Index (BMI)
ACO 101: Intro to Computer Science Anatomy Part 3: The Constructor.
Chapter 5 Classes and Methods II Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
LING 408/508: Programming for Linguists Lecture 18 November 2 nd.
Homework #2: Functions and Arrays By J. H. Wang Mar. 24, 2014.
Homework #4: Operator Overloading and Strings By J. H. Wang May 12, 2014.
1 ENGI 2420 Structured Programming (Lab Tutorial 1) Memorial University of Newfoundland.
Homework #3: Classes and Constructors By J. H. Wang Apr. 24, 2015.
How fit are you? Learning Objectives: * To consider different ways of measuring fitness. * To collect measurements and calculate your own BMI. * To use.
Bearings Port to ship and ship to port In each diagram follow the steps below Use your protractor to measure the bearing of the ship from the port. Use.
Multi-dimensional Array 1 Multi-dimensional array refers to an array with more than one index. It is a logical representation. On physical storage, the.
Homework #4: Operator Overloading and Strings By J. H. Wang May 22, 2015.
3-July-2002cse142-D2-Methods © 2002 University of Washington1 Methods CSE 142, Summer 2002 Computer Programming 1
Sadegh Aliakbary Sharif University of Technology Fall 2010.
How to Calculate Your Body Mass Index (BMI)
HW 1 Kirk Scott.
Reference: COS240 Syllabus
HW7(100pts+10bonus) The homework Due on May 11, 23:59:59
EECs 183 Discussion 10 Hannah Westra.
HW3 (100Points) The homework Due on March 17, 23:59:59
Measuring Matter 2.2 Weight and Mass
group work #hifiTeam
Tree Diagrams A group of males and females were surveyed to find out whether they were left-handed or right-handed. In the group, 55% were male. Of.
CSC 113: Computer programming II
HW8(60pts) The homework Due on May 19, 23:59:59 請注意:本次作業開始,請將所有的檔案從gitlab刪除,只留下當 次的作業。例如本次作業應該只需要以下檔案上傳至Gitlab.
ITunes Lab Copyright © 2012 Pearson Education, Inc.
Exception Handling Chapter 9 Edited by JJ.
BHASVIC MαTHS Skills 1 A1 DOUBLES ASSIGNMENT 20B
Recitation 4 September 16, 2011.
!'!!. = pt >pt > \ ___,..___,..
© A+ Computer Science - OOP © A+ Computer Science -
TIERING ACTIVITY FITNESS.
Calculating Your Caloric Needs
Chapter 5 Processing Input with Applets
Fundamental Programming
Metric –U.S. Customary Comparisons
HW9(100pts) The homework Due on May 26, 23:59:59 請注意:本次作業開始,請將所有的檔案從gitlab刪除,只留下當 次的作業。例如本次作業應該只需要以下檔案上傳至Gitlab。 HW9請沿用HW8的algorithm.h檔案.
COMS W1004 Introduction to Computer Science
Composition & Inverses Review
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
C++ data types.
1. What animal 2. Male or Female ? 4. Male or Female? Why? Why?
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

HW5(50pts) The homework Due on April 14, 23:59:59 Part 1(20pts). Design class Please create a new class named BMICalculator, the class diagram should look something like below. Please implement the five methods in the class you created for the class diagram.

BMICalculator(string) is a constructor, the string you need to input “male” or “female” to the constructor. Please set the default BMI as 24 for male and 22 for female according Wikipedia. BMICalculator(string, double, double) is another constructor, where the string parameter should be male or female, the first double parameter is for the weight and the second is for the height. getBMI() is to return BMI you calculate. getWeight(double height) is to return the suitable weight you calculate, where the input parameter height is in “centimeter” getHeight(double weight) is to return the suitable height you calculate, where the input parameter weight is in “kilogram”

Part 2(10pts). Unit testing For each method, you need to write 1 unit tests. Besides that, you need to write one exception unit test for the two constructors. (It means that, totally you have to write 5 unit tests. ) Hint: the string thrown in your constructor must be “unknown sex according to Wikipedia on BMI”

Part 3.(20pts) TA testing We have written 8 unit tests to test the five methods of BMICalculator.h you write. The test cases will not be announced. You have to make all of them pass. You know this by checking Reports on Jenkins.