Create a program called PIK-PAK-BOOM. The program prints the numbers from the specified start number to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a program called PIK-PAK-BOOM. The program prints the numbers from the specified start number to the end number, printing n numbers per line. It shall print "Pik" in place of the numbers which are multiples of 3, "Pak" for multiples of 5, "Boom" for multiples of 7, "PikPak" for multiples of 3 and 5, "PikBoom" for multiples of 3 and 7, "PakBoom" for multiples of 5 and 7, and "PikPakBoom" for multiples of 3, 5 and 7. Also the program should display the result statistics. - start: int - end: int UML Diagram PikPakBoom - countPerLine: int -pikCount: int - pakCount: int - BoomCount: int - pikPakCount: int -pikBoomCount: int -pakBoomCount: int -pikPakBoomCount: int +setStart(start: int): void + getStart() : int + setEnd(end: int): void +getEnd(): int + setCountPerLine(countPerLine: int) : void + getCountPerLine(): int + displayResult(): void +printStats(): void PikPakBoom Result - Start: 11, End: 70, Count Per Line: 10 11 Pik 13 Boom PikBoom 22 23 Pik PikPak 16 Pak 17 Pik 19 Pak 26 Pik Boom 29 PikPak 31 32 Pik 34 PakBoom Pik 37 38 Pik Pak 41 PikBoom 43 44 PikPak 46 47 Pik Boom Pak Pik 52 53 Pik Pak Boom Pik 58 59 PikPak 61 62 PikBoom 64 Pak Pik 67 68 Pik PakBoom PikPakBoom Statistics Pik: 13 Pak: 6 Boom: 4 PikPak: 4 PikBoom: 3 PakBoom: 2 PikPakBoom: 0 Create a program called PIK-PAK-BOOM. The program prints the numbers from the specified start number to the end number, printing n numbers per line. It shall print "Pik" in place of the numbers which are multiples of 3, "Pak" for multiples of 5, "Boom" for multiples of 7, "PikPak" for multiples of 3 and 5, "PikBoom" for multiples of 3 and 7, "PakBoom" for multiples of 5 and 7, and "PikPakBoom" for multiples of 3, 5 and 7. Also the program should display the result statistics. - start: int - end: int UML Diagram PikPakBoom - countPerLine: int -pikCount: int - pakCount: int - BoomCount: int - pikPakCount: int -pikBoomCount: int -pakBoomCount: int -pikPakBoomCount: int +setStart(start: int): void + getStart() : int + setEnd(end: int): void +getEnd(): int + setCountPerLine(countPerLine: int) : void + getCountPerLine(): int + displayResult(): void +printStats(): void PikPakBoom Result - Start: 11, End: 70, Count Per Line: 10 11 Pik 13 Boom PikBoom 22 23 Pik PikPak 16 Pak 17 Pik 19 Pak 26 Pik Boom 29 PikPak 31 32 Pik 34 PakBoom Pik 37 38 Pik Pak 41 PikBoom 43 44 PikPak 46 47 Pik Boom Pak Pik 52 53 Pik Pak Boom Pik 58 59 PikPak 61 62 PikBoom 64 Pak Pik 67 68 Pik PakBoom PikPakBoom Statistics Pik: 13 Pak: 6 Boom: 4 PikPak: 4 PikBoom: 3 PakBoom: 2 PikPakBoom: 0 Create a program called PIK-PAK-BOOM. The program prints the numbers from the specified start number to the end number, printing n numbers per line. It shall print "Pik" in place of the numbers which are multiples of 3, "Pak" for multiples of 5, "Boom" for multiples of 7, "PikPak" for multiples of 3 and 5, "PikBoom" for multiples of 3 and 7, "PakBoom" for multiples of 5 and 7, and "PikPakBoom" for multiples of 3, 5 and 7. Also the program should display the result statistics. - start: int - end: int UML Diagram PikPakBoom - countPerLine: int -pikCount: int - pakCount: int - BoomCount: int - pikPakCount: int -pikBoomCount: int -pakBoomCount: int -pikPakBoomCount: int +setStart(start: int): void + getStart() : int + setEnd(end: int): void +getEnd(): int + setCountPerLine(countPerLine: int) : void + getCountPerLine(): int + displayResult(): void +printStats(): void PikPakBoom Result - Start: 11, End: 70, Count Per Line: 10 11 Pik 13 Boom PikBoom 22 23 Pik PikPak 16 Pak 17 Pik 19 Pak 26 Pik Boom 29 PikPak 31 32 Pik 34 PakBoom Pik 37 38 Pik Pak 41 PikBoom 43 44 PikPak 46 47 Pik Boom Pak Pik 52 53 Pik Pak Boom Pik 58 59 PikPak 61 62 PikBoom 64 Pak Pik 67 68 Pik PakBoom PikPakBoom Statistics Pik: 13 Pak: 6 Boom: 4 PikPak: 4 PikBoom: 3 PakBoom: 2 PikPakBoom: 0 Create a program called PIK-PAK-BOOM. The program prints the numbers from the specified start number to the end number, printing n numbers per line. It shall print "Pik" in place of the numbers which are multiples of 3, "Pak" for multiples of 5, "Boom" for multiples of 7, "PikPak" for multiples of 3 and 5, "PikBoom" for multiples of 3 and 7, "PakBoom" for multiples of 5 and 7, and "PikPakBoom" for multiples of 3, 5 and 7. Also the program should display the result statistics. - start: int - end: int UML Diagram PikPakBoom - countPerLine: int -pikCount: int - pakCount: int - BoomCount: int - pikPakCount: int -pikBoomCount: int -pakBoomCount: int -pikPakBoomCount: int +setStart(start: int): void + getStart() : int + setEnd(end: int): void +getEnd(): int + setCountPerLine(countPerLine: int) : void + getCountPerLine(): int + displayResult(): void +printStats(): void PikPakBoom Result - Start: 11, End: 70, Count Per Line: 10 11 Pik 13 Boom PikBoom 22 23 Pik PikPak 16 Pak 17 Pik 19 Pak 26 Pik Boom 29 PikPak 31 32 Pik 34 PakBoom Pik 37 38 Pik Pak 41 PikBoom 43 44 PikPak 46 47 Pik Boom Pak Pik 52 53 Pik Pak Boom Pik 58 59 PikPak 61 62 PikBoom 64 Pak Pik 67 68 Pik PakBoom PikPakBoom Statistics Pik: 13 Pak: 6 Boom: 4 PikPak: 4 PikBoom: 3 PakBoom: 2 PikPakBoom: 0
Expert Answer:
Answer rating: 100% (QA)
Based on the UML class diagram you provided heres a possible implementation for ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
In response to intense foreign competition, Florex Company has taken steps to improve the quality of its products. A summary of its quality costs ( in thousands ) over the past two years is given...
-
Is the use of dual dating still relevant today given the requirements of obtaining sufficient, appropriate evidence?
-
Create a program called Fraction Class is the definition for a Fraction object. Classes contain Attributes (the data) and Behaviors (the methods). The Fraction Attributes A fraction is an object that...
-
State whether the following statement are True or False An increase in the owner(s) equity, in the absence of any further investment by the owners is typically effected by sale transactions.
-
Suppose that c2 = 1.0 and that A = -20.0C. Find the value of c1 required to maintain an equilibrium temperature of 40.0C when r = 1.0 and when r = 2.0. Which organism needs to generate less heat to...
-
A mass of 5 kg of saturated water vapor at 300 kPa is heated at constant pressure until the temperature reaches 200oC. Compute the work done by the steam during this procedure.
-
Which of the following is NOT a control implication of distributed data processing? a. redundancy b. user satisfaction c. incompatibility d. lack of standards
-
Congratulations! You have won a state lottery. The state lottery offers you the following (after- tax) payout options: Option # 1: $ 15,000,000 after five years Option # 2: $ 2,150,000 per year for...
-
tan(240)= tan (4) tan(120) = tan () n (3) tan tan(210)= 1. 1 2.-1 3. 3 4. 5. 3 3 6. 3 7. 2 8. 22 300 2 2 >
-
Shell Company, an 85% owned subsidiary of Plaster Company, sells merchandise to Plaster Company at a markup of 20% of selling price. During 2024 and 2025, intercompany sales amounted to $442,500 and...
-
Sept1 Business owner also paid a $8,000 worth computer for the business. Dr. Choose... Cr. Choose... 41 Ti Qu No M P
-
In addition to the social media sites identified in this chapter, are there other social media sites that would be particularly helpful in a family law case? A personal injury case? Find other social...
-
A final audit report is most useful to executive managers when it: a. Provides an overall, appropriately supported opinion on the operations reviewed. b. Summarizes audit results. c. Gives...
-
Find a California case where social media was used.
-
Direct support for the internal audit report is provided by the: a. Preliminary survey. b. Walk-through of a facility. c. Audit working papers. d. Preliminary interview with the auditee. e. All of...
-
Which of the following ways can models be classified? a. How they mirror reality. b. How they will be employed. c. How they will be developed. d. All of the above. e. None of the above.
-
Sandhill Limited purchased a computer for $9,200 on January 1, 2023. Straight-line depreciation is used for the computer, based on a five-year life and a $900 residual value. In 2025, the estimates...
-
Imagine you are the HR manager at a company, and a female employee came to you upset because she felt a male coworker was creating a hostile work environment by repeatedly asking her out on dates...
-
Modify the Products form by changing the Buyer ID text box control to a combo box control, listing the choices of Buyer ID and Buyer Name from the Buyers table. Be sure to first remove the...
-
Create a new Allowance for Uncollectible Accounts Analysis a. Using the ch7-03 file to start your work, create a worksheet to do the following: i. Calculate uncollectible accounts expense and the...
-
How and why are wildcards used in a query?
-
What is the cost of net debt of a company that has no more shareholders equity equal to? And the cost of capital?
-
Is the cost of capital an accounting or financial concept?
-
What are we forgetting when we say that by increasing return on equity, the leverage effect of debt cannot increase value?
Study smarter with the SolutionInn App