Question
-Write a simple java program to print just one star (* ) through the base case. - Write a java program by using the following
-Write a simple java program to print just one star (* ) through the base case.
- Write a java program by using the following information.
a) Create a Class name for the class Book
b) Declare the attributes as BookNumber, Bookname, Pages with the suitable data types.
c) Create an empty constructor for the class Book.
d) Create an accessor method getPages( ) and return the pages.
e) Create a mutator method as setBookName( ) with the parameternewBookName.
Q-4)
a) Draw a class diagram by a box with the name of the following class, list of attributes, and list of methods.
Class name: Time
Attributes names : hour, minute and second Methods: toString() :String
getHour() : int setMinute() :void
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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