Computer Science, asked by kswaslko09, 6 months ago

Define a class named Number with the following
description:

Instance variables/ data members:

int num - to store a number

Member methods:

Number() - default constructor to initialize num by 0

void accept() - to input and store an integer in num

boolean issquare(int x) - to check whether the value in x is a
square of the value in num and return true if it is and false otherwise.

Write a main method to create an object of the class and call
the above member methods to print the appropriate​

Answers

Answered by ayushraj20164
2

Answer:

hnzjznjshsnuxhndubsizusb d x

Similar questions