Python Design a Class Named Fan to Represent a Fan

Guest User

Design a class titled Fan to represent a fan

a node

Oct 15th, 2014

200

Ne'er

Not a member of Pastebin yet? Sign , it unlocks many cool features!

  1. 1.  Design a class titled Fan to represent a fan. The class contains: an int information field of operations named speed that specifies the hurry of the sports fan. A buff has tercet speeds indicated with a value 1, 2, 3. A bool data playing area called along that specifies whether the fan is on.A double information field named radius that specifies the radius of the fan.A no-arg constructor that creates a default winnow with speed = 1, and radius = 10The accessor and mutator functions for all the data fields.Tone: Scarce CREATE fan.h and fan.cpp - no need to make over the main.cpp - I just wishing to see the design of the class. (Points : 18)1.  Create a class known as person that can hold a person's name and age - also use dateType from year exercises to hold the person's birthday in the person class. Make up the necessary attributes, accessor and mutator methods, a print function, and a constructor WITH argumentsNote: Produce the class person.h and person.cpp only - you don't need the briny.cppNote: You do not call for to admit the dateType class in your serve just show me how you would use an object of the dateType family in your person class. (Points : 18)3. Create a course called Child that inherits from the person class from the previous question.Divagation from entering a child's name, years and bithday using the person class.The Child class should allow for entrance what grade the child is in and the child's gender.Create the necessary attributes, accessors, mutators, black and white social occasion, and a constructor WITH arguments.1.  Create a class called rear that inherits from the person class - aside from setting the grown's name, years and birthday using the person class - you should also be able to coiffe the bring up's occupation, spouse's name, whether they are mom operating room dad, and the number of children they have.Create the requisite attributes, accessors, mutators, print function, and a constructor WITH arguments.Note: Produce adult.h and adult.cpp only - not the main.cpp (Points : 18)1.  Create a class named simpleMath - this class should have two int attributes and accessor and mutator methods to set and receive those two int attributes - and a calcSum method that returns the sum of the deuce ints, a calcDifference method that returns the difference of the two ints, a calcProduct method acting that returns the intersection of the two ints, and a calcDivision method that returns the division result of the two ints. Also micturate sure to make up a constructor WITH arguments.(The order of a/b or b/2 , a-b, b-a, is up to you)Note: Just need to create the simpleMath.h and simpleMath.cpp files not main.cpp (Points : 18)6. Create a class called Coin with nonpareil string attribute.Create the proper accessor/mutator methods for the attribute.Create a builder that takes no arguments that sets the strand to "Undiagnosed"Produce a method that returns the numeric value of the mint drawing string name.For example: .25 should be returned if the string attribute holds "Quarter".05 should be returned if the string assign holds "Nickel"etc. Notice: Just compose out Strike.h and Coin.cpp - no need for main.cpp (Points : 18)7. Put the somebody, child, and the parent classes together - keep in mind that person as wel has a composition with a dateType object. (You father't need dateType.h and dateType.cpp in your resolve here - but power need information technology if you want to compile this in visual studio apartment)Edit out your classes -  1) Make the print go in the person class a pure virtual serve - which makes person class an abstract class  2) Make the parent course of study besides hold a baby targe array so that in the parent class you can not only interpose how many an children the parent has but that many set out objects holding all of the child's name, age, birthday, grade, and gender.   3) Edit the parent class print run so that it prints both the parent object information and the tiddler information.Create your void main - In your void chief create unmatchable dynamic illustrate of a parent object - and ask a user (assuming they are a rear) for their describ, age, birthday, occupation, spouse's name, whether they are mom or dad, number of children. Then for each children take for the child's name, age, birthday, range, and gender. Once you set all of this information for the dynamic parent targe. Call the print function from the parent object so that it displays all of this information back to the user.Short letter: Since I can get word the classes from your past answers - merely paste in here the editted methods from the classes you made and the void principal code. (Points : 22)

RAW Paste Information

Python Design a Class Named Fan to Represent a Fan

Source: https://pastebin.com/M9JLgC8b

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel