Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Based on the UML class diagram you provided heres a possible implementation for ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started