top of page

PROGRAMMING CHALLENGES

Prime Number Checker Class

Difficulty:

2 Medium

2.6 OOP

Topic:

Design a class called PrimeChecker with a method isPrime() that checks if a number is prime. Write the constructor and implement isPrime() method.

A constructor initializes an object. The isPrime() method should iterate through possible divisors and check for factors.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page