Design and implement a class called cheetah

Assignment Help C/C++ Programming
Reference no: EM13329171

Problem 1

Design and implement a class called Cheetah that contains instance data that represents the cheetah's name, age, weight, length and gender. Define the Cheetah constructor to accept and initialize the instance data. Include getter and setter methods for the name, age, weight, length and gender. Include a method to compute and return the age until maturity (15 months until mature). Include a toString method that returns a one- line description of the cheetah. Create a driver class called Safari, whose main method instantiates and updates at least 3 cheetah objects.

Problem 2

Design and implement a class called Bus that represents any bus route. It should contain instance data that represents the Bus Route Line, Number Of Stops on the line, and the Bus's starting point and final stop, the distance between each stop (assume the distance is the same), the speed of the bus, and the time spent at each stop.Define the Bus constructor to accept and initialize all instance data. Include getter and setter methods for all instance data. Create a method that calculates the time required to travel between the starting point and stopping point of the line based on a given speed.

Include a toString method that returns a one-line description of the Bus trip including bus line, number of stops, origin and destination stops, distance between the beginning and end of the line, and the time required to travel between the beginning and ending stops at a given speed and the number of stops. Create a driver class called BusTrip, whose main method instantiates and uses at least 3 Bus objects.

Problem 3

Create a class called Simple Question and Answer that contains instance data for a simple mathematical question (i.e. What is 5*4?) and for the answer (i.e. 20).Create a constructor that initializes the data.Create a method that returns the question.Create a method that returns that answer. In the driver, you should ask the user if they want to play a simple game and then have them answer at least 5 questions.(you do not need a loop for this) You will create questions with randomized numbers being passed into the constructor. After the user answers the question, just put the actual answer down below the one entered. You do not need to check if they were correct.

Reference no: EM13329171

Questions Cloud

Will any of pats wages be exempt from social security : Pat Maninen earns a gross salary of $2,100 each week. Assume a rate of 6.2% on $106,800 for Social Security and 1.45% for Medicare. What are Pat's first week's deductions for Social Security and Medicare
Define the cheetah constructor to accept and initialize : Design and implement a class called Cheetah that contains instance data that represents the cheetah's name, age, weight, length and gender.
Calculate the escape velocity for a planet : Calculate the escape velocity for a planet that has twice the mass of Earth and is half the size of Earth
Find the work done on the jet by the catapult : A fighter jet is launched from an aircraft carrier with the aid of its own engines and a steam-powered catapult. The thrust of its engines is 3.26 x 105 N. What is the work done on the jet by the catapult
Design and implement a class called cheetah : Create a method that calculates the time required to travel between the starting point and stopping point of the line based on a given speed.
Calculate the typical pay before overtime was cut : Full-time employees (40 hours per week) at the local steel mill were used to earning up to 10 hours of overtime in a two-week time period. They would typically work five overtime hours Monday through Friday and five overtime hours on the weekend.
Calculate the schwarzschild radius of a blackhole : Most of the blackholes observed by astronomers have masses equal to a few solar masses (the result of the death of a high mass star) or have masses equal to several million solar masses
What are the temperature and pressure inside the container : The nuber density in a container of neon gas is 5.00X10^25 m^(-3). The atoms are moving with an rms speed of 660m/s. What are (a) the temperature and (b) the pressure inside the container
Explain the molar solubility of magnesium hydroxide : What is the molar solubility of magnesium hydroxide: in water, in pH 12.00 buffer, and in 0.50M magnesium nitrate

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Function called timesten that returns back

Write a function called timesTen that returns back to the caller the value passed into the function multiplied by 10. If the value passed into the function is negative, the function also returns the string

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

  Write a function that finds area and volume of a cube

write a function that finds area and volume of a cube when length is input and then write a program to test it. here is what i have so far.

  Print out the sum of all numbers, the average

Write a program that reads in a list of integer numbers and print out the sum of all numbers, the average, the lowest and the highest value entered. The first input number indicates how many numbers the program is attempting to read

  Illustrate example from ansi c programming language

Illustrate example from ANSI C programming language, without using nested procedures, to show the fact that "assignment-by-sharing in conjunction with quasi-dynamic object binding

  Each has a string for their name

Create a class in C++ that holds robot warriors. Each has a string for their name, a number of hitpoints (an float), armor (a defensive modifier(an int)), and weaponry (an offensive multiplier(another int)). You will create 5 robots with a random ..

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  Wrtie a function called gen_rand_double_array

Wrtie a function called gen_rand_double_array that generates 900 samples of size 22500 random numbers from U(10, 12). For each of these 900 samples, write a main funciton that calculates the mean and finds the simulated probability that the mean is b..

  Design an algorithm to find the selling price

To make a profit, the prices of the items sold in a furniture store are marked up by 60%. Design an algorithm to find the selling price of an item sold at the furniture store. What information do you need to find the selling price?

  Write a program that asks the user to enter the monthly cost

Write a program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost ..

  Write a c program to search a list of integers

Write a C program to search a list of integers for a particular value. The user should be prompted to enter the value to be searched for. Your program will then print out whether the value was found or not.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd