subject

Write the following static methods. assume the reference variable input for the scanner class and any global variables mentioned are already declared. use printf.

a. a method called tickets() that prompts for the number of tickets to be purchased and stores it in a global variable called nooftickets. think about the data type.

b. overload the method coded in 1a above so that it accepts the number of tickets and the price for a ticket through its parameter list, and returns the cost for the ticket(s). no prompts are needed.

c. a value-receiving method that accepts the cost for a ticket purchase and adds it to a global variable called monthlyfun.

d. a method that accepts yearlyfun and yearlyfunbudget through its parameter list and tests to see if yearlyfun is over-budget, under-budget, or on-budget. if it is over-budget return the message "way too much fun! over-budget! "; under-budget return "little more fun! under-budget! "; and on-budget "just the right fun! " on-budget! ". no prompts are needed.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
Write the following static methods. assume the reference variable input for the scanner class and an...
Questions
question
Mathematics, 06.01.2021 22:10
question
Social Studies, 06.01.2021 22:10
question
History, 06.01.2021 22:10
question
Biology, 06.01.2021 22:10
question
Chemistry, 06.01.2021 22:10
question
English, 06.01.2021 22:10
question
Law, 06.01.2021 22:10
Questions on the website: 13722367