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

  Print each employee''s identification number

1) in a program you need to store the identification numbers of 10 employees (as ints) and their weekly gross pay (as doubles) A) Define two arrays that may be used in parallel to store the 10 employee indentificcation numbers and gross pay amounts B..

  Write a c function to convert gallons-quarts-pints and cups

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups.

  Complete the payroll program with following driver object

complete the payroll program with the following driver objects.

  Write a program that takes a positive integer

Write a program that takes a positive integer from the user and prints the rightmost digit of that integer. This is a sample output: Enter an integer: 1247

  Write an algorithm that converts a decimal number

Write an algorithm that converts a decimal number between 0 and 15 into its 4 bit unsigned binary representation and write an algorithm that converts a linear measurement in feet and inches into meters. One inch is equivalent to 2.54 centimeters.

  Write program which inputs number of winning coupons

Write a program which inputs number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all off your coupons on candy bars first and remaining coupons on gumballs in c++.

  Write a c program that reads a data file of floating numbers

Write a program that reads a data file of floating numbers into an array and prints the array elements along with the number of items in the array

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

  Program that compares the number of possible sequences

Write a c++ program that compares the number of possible sequences of the length L that can be generated. The program must output a formatted list comparing the number of possible sequences for L=5,6,7,8,9. given size N=9

  Initialize an array and fill the array with the gpa values.

Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.

  Make a game in which you guess a number

Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example

  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.

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