first commit
This commit is contained in:
12
Semester 1/Programming 1/Week 5/Workshop 5/README.TXT
Normal file
12
Semester 1/Programming 1/Week 5/Workshop 5/README.TXT
Normal file
@@ -0,0 +1,12 @@
|
||||
------------------------------------------------------------------------
|
||||
This is the project README file. Here, you should describe your project.
|
||||
Tell the reader (someone who does not know anything about this project)
|
||||
all he/she needs to know. The comments should usually include at least:
|
||||
------------------------------------------------------------------------
|
||||
|
||||
PROJECT TITLE:
|
||||
PURPOSE OF PROJECT:
|
||||
VERSION or DATE:
|
||||
HOW TO START THIS PROJECT:
|
||||
AUTHORS:
|
||||
USER INSTRUCTIONS:
|
||||
25
Semester 1/Programming 1/Week 5/Workshop 5/package.bluej
Normal file
25
Semester 1/Programming 1/Week 5/Workshop 5/package.bluej
Normal file
@@ -0,0 +1,25 @@
|
||||
#BlueJ package file
|
||||
objectbench.height=76
|
||||
objectbench.width=686
|
||||
package.editor.height=400
|
||||
package.editor.width=560
|
||||
package.editor.x=20
|
||||
package.editor.y=51
|
||||
package.numDependencies=0
|
||||
package.numTargets=1
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
project.charset=UTF-8
|
||||
target1.editor.height=700
|
||||
target1.editor.width=900
|
||||
target1.editor.x=491
|
||||
target1.editor.y=190
|
||||
target1.height=50
|
||||
target1.name=test
|
||||
target1.naviview.expanded=true
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.typeParameters=
|
||||
target1.width=80
|
||||
target1.x=70
|
||||
target1.y=10
|
||||
BIN
Semester 1/Programming 1/Week 5/Workshop 5/test.class
Normal file
BIN
Semester 1/Programming 1/Week 5/Workshop 5/test.class
Normal file
Binary file not shown.
10
Semester 1/Programming 1/Week 5/Workshop 5/test.ctxt
Normal file
10
Semester 1/Programming 1/Week 5/Workshop 5/test.ctxt
Normal file
@@ -0,0 +1,10 @@
|
||||
#BlueJ class context
|
||||
comment0.params=
|
||||
comment0.target=int\ modify()
|
||||
comment1.params=
|
||||
comment1.target=test()
|
||||
comment1.text=\n\ Constructor\ for\ objects\ of\ class\ test\n
|
||||
comment2.params=
|
||||
comment2.target=float\ sampleMethod()
|
||||
comment2.text=\n\ An\ example\ of\ a\ method\ -\ replace\ this\ comment\ with\ your\ own\n\ \n\ @param\ \ y\ \ \ a\ sample\ parameter\ for\ a\ method\n\ @return\ \ \ \ \ the\ sum\ of\ x\ and\ y\ \n
|
||||
numComments=3
|
||||
47
Semester 1/Programming 1/Week 5/Workshop 5/test.java
Normal file
47
Semester 1/Programming 1/Week 5/Workshop 5/test.java
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
/**
|
||||
* Write a description of class test here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class test
|
||||
{
|
||||
// instance variables - replace the example below with your own
|
||||
private int sum1, sum2;
|
||||
private float number;
|
||||
private double total;
|
||||
|
||||
public void modify( int num )
|
||||
{
|
||||
num = 10;
|
||||
System.out.println( num );
|
||||
}
|
||||
|
||||
modify();
|
||||
|
||||
/**
|
||||
* Constructor for objects of class test
|
||||
*/
|
||||
public test()
|
||||
{
|
||||
// initialise instance variables
|
||||
sum1 = 10;
|
||||
number = 2.5f;
|
||||
sum2 = 20;
|
||||
total = 10.25d;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 float sampleMethod()
|
||||
{
|
||||
// put your code here
|
||||
number = sum1 / sum2;
|
||||
return number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user