vault backup: 2024-02-20 13:05:19
This commit is contained in:
33
Semester 2/Programming 2/Project/Part 1/Periodical.java
Normal file
33
Semester 2/Programming 2/Project/Part 1/Periodical.java
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
/**
|
||||
* Write a description of class Periodical here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Periodical extends LibraryItem
|
||||
{
|
||||
// instance variables - replace the example below with your own
|
||||
private int x;
|
||||
|
||||
/**
|
||||
* Constructor for objects of class Periodical
|
||||
*/
|
||||
public Periodical()
|
||||
{
|
||||
// initialise instance variables
|
||||
x = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* An example of a method - replace this comment with your own
|
||||
*
|
||||
* @param y a sample parameter for a method
|
||||
* @return the sum of x and y
|
||||
*/
|
||||
public int sampleMethod(int y)
|
||||
{
|
||||
// put your code here
|
||||
return x + y;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user