This assignment must be completed by 9:00 AM on Saturday, 7 September and uploaded to the Homework 3 moodle page. You should upload both the Home03.java and Frequency.java files.
Why?
The purpose of this assignment is to be sure that you can create
classes with the right name and in the
edu.unca.cs.csci202
package and with a proper
@author
annotation
and upload them to moodle.
That’s all.
It’s an easy 20 points.
The task
Create a project, a Java application,
where the main class is called
Home03
and a second class is called Frequency
.
Both packages should be in the
edu.unca.cs.csci202
package.
The complete body for the main
method of Home03
is given below.
Frequency red = new Frequency() ; red.setFrequency(430e12) ; System.out.println(red.getFrequency()) ;
The complete body for the Frequency
class, with instance
variable, constructor and methods is:
private double frequency ; public Frequency() { this.frequency = 2.4e9 ; // 2.4 Ghz } public double getFrequency() { return frequency ; } public void setFrequency(double frequency) { this.frequency = frequency ; }
Both of your classes must have an @author
that
gives your name and your unca.edu email address.
Review Lab 2 to see the
easy way to do this every time.