00:01
In this question, we have to write a code in java.
00:04
So, let us have a look at the steps we are going to follow.
00:10
So, here, first we have to assume that we have to create a class for a book v3 object.
00:20
That is, so, we'll see how we are going to do this.
00:27
So first we'll do is create a class diagram.
00:30
So, here, as you can see, in this, what we are going to do is, before we start coding, it will be helpful for us to create a class diagram to visualize the relationship between the classes and their methods.
00:57
So, this should have the class name, attributes and methods.
01:03
So next thing that we have to do is we have to create implementation cases.
01:11
So here, the project folder that is given to us in the question, we create a new java class name that will be given like this.
01:32
That is, bookv3 .java.
01:38
So assuming that, this is assuming that we are using java.
01:45
So here, we'll see how we are going to proceed this in a basic java compiler so that we get a good idea about it.
01:53
So firstly, we will have or we will get some or we'll define some attributes.
02:06
So we'll have a public class bookv3 as it is given.
02:14
So we have introduced this class.
02:18
It is the implementation of the bookv3 object.
02:21
So it contains attributes that is data members and methods to work with the book object.
02:29
So the attributes here are the title, author and page count.
02:34
So these are the instance variables that score information about the book's title, author and count, that is the page count.
02:45
So now we have to have a default constructor.
02:49
So it is somewhat like this.
02:54
So now we can see that this is the constructor that is bookv3.
03:00
This is the default constructor.
03:02
It will initialize the attributes with default values that is unknown title or unknown author or zero pages...