Skip main navigation

How to Design a Class

Barb Ericson explains how to create a class for a number guessing game. The attributes for this class are the random number and the current guess.

. . . . . . . . . . . . . . . . . .

This video explains how to create a class for a number guessing game. The two attributes for this class would be the random number and the current guess. Objects of this class also require a play method.

This article is from the free online

The Power of Object-Oriented Programming

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now