create class creature with class member legs, eyes, hands, height, weight and skin color in C++

User Generated

ylu950515

Programming

Description

Please follow the coding style in example.doc


Create class Creature with class member legs, eyes, hands, height, weight, and skin color.You decide what the types of these member variables will be. Provide setters and getters.In the main() method instantiate a Creature object and set its members, and then display the members’ value using its getter methods.

Unformatted Attachment Preview

Requirements: Instructions: • • • According to some research, industry values documentation, and excellent written and oral communication skills. The purpose is to encourage you to gain these skills. Make a copy of this entire document and add your work into it. [You can earn a maximum of 30 points for this lab. Refer to the syllabus for late point deductions.] Problem Statement The objective of this quest is to get you reacquainted with the C++ programming language and to jump-start the Visual Studio environment. There are myriads of C++ IDE in the market today, we choose to use Visual Studio because it is the dominant IDE for C++ development, and the interface is simple. Create class Creature with class member legs, eyes, hands, height, weight, and skin color. You decide what the types of these member variables will be. Provide setters and getters. In the main() method instantiate a Creature object and set its members, and then display the members’ value using its getter methods. Hints • Review the examples discussed by the instructor and are now posted in Canvas. Code Development: [Switch to View Code and paste all your code solution here] Testing: What is testing for? Every program you wrote, you are responsible for unit testing it. The first thing to do, once you have a program that “basically works”, is to try to break it. Try to feed your program input(s) in the hope of getting it to misbehave. By “hope” means that the challenge here is to find as many errors as possible, so that you can fix the errors before anybody else finds them. If you go into this exercise with the attitude that “my program works, and I don’t make errors!”, then you won’t find many bugs, and you will feel bad when you do find one or when someone finds one. You’d be playing head games with yourself! The right attitude when testing is, “I’ll break it! I’m smarter than any program--even my own!” Feed (or try) a few such “problematic” inputs to your program and try to figure out in how many ways you can get it to misbehave. Can you get the program to crash? Testing is a very important part of game development, and can actually be fun. You may input data that is not “sensible”. A program ideally catches all errors, not just the sensible ones--this will make your program resilient against “strange input.” As a goal, you would like the test to exercise every statement in your program, at least once. Test both positive and negative scenario. One example of positive testing is--if you have an input that requires an integer value, would it work if you give it the numeral 7? Moreover, as an example of negative testing: what happens if you give the previous program a string input of “seven” (instead of the numerical 7)? Identify if your test results are “Passed” or “Failed”. Use the table below, and add at least five test cases of your own! [Type at least 5 test cases and what was the result? Did the result pass or fail? Do a negative test case too!] Test # Test Description Result (Passed/Failed) 1 Example positive testing: Typed the number 7 as input Passed for health field. 2 Example negative testing: Type the word “seven” as input for health field. Failed Add as many rows as needed. Production Deployment: [Paste all your own final screens in this section.] Make sure your output screen shot is readable, magnify if necessary so the instructor can easily read it. A sample magnified output is shown below; replace this with your own. GRADING RUBRIC Grading Criteria Coding Output Testing Documentation Late 3 2 1 0 Exceeds Meets Partially Meets Does Not Meet Excellent Epic Wow +15-Code is excellent, comments are added, and different techniques were used. +5-Outputs are correct, and provided additional output cases. +5-Test cases were excellent, and provided more test cases than what is required. Satisfactory O.K. +12-Code is O.K., and program works. Below Expectations Not Yet +8-Code works, but still needs improvement. Unacceptable Fail Unfortunately, no coding. +3-Output meets requirement and is readable. Unfortunately, no output. +5-Excellent documentation. No misspelling, well formatted, and correct syntax. Excellent, you submitted it before the deadline. +3-Documentation meets requirements. +1-There is output, but not readable, and/or needs improvement. +1-Test needs improvement, did not make sense, and did not meet minimum test case requirements. +1-Documentation has misspelling, or syntax issues, or not clear, or needs improvement. -10, unfortunately for submitting several weeks after the deadline. +3-Provided valid tests, and meets minimum test case requirements. -5, unfortunately for submitting after the deadline. Unfortunately, no testing. Unfortunately, no documentation. -15, unfortunately, for submitting very late. I. How to instantiate (create) an object from a class and use its methods? 1. Create a driver program.  A driver program is program that exercises the methods of an object. The driver’s program purpose is to test the accuracy and validity of a class. A driver program can be another class or it could be the main() method of your class. 2. Remember, you can not run a class by itself – you have to create an object of that class. You don’t eat the cookie cutter – you eat the cookies! A. Declaring an object from a class is similar to declaring a variable of primitive type. B. Example: int dollars; // primitive declaration Money yourAmount; // object declaration Player Mario; // object declaration Robot hal; // object declaration Monster leviathon; // object declaration 3. Use dot notation to invoke the methods of an object. A. Example: Gold yourGold; yourGold.input(); yourGold.output(); B. Example complete program:
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

At...


Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags