I am stuck at this part.
(part c)
A Java application (with the main() method) that uses the class you created in (part b):
Using two different constructors, create at least 2 objects from the class in (part b)
Call all the methods that you have created in (part b). Use the mutators to change the attributes, and use the accessor to get the attributes.
(look at my starting post for part B requirements.)
How do I do it ? Seriously, I have no idea how. I feel very desperate nowfor answers
here are the codings (two java files)
Feedback.java
public class Feedback {
private String Name;
private String Topic;
private String Description;
public String getName(){
return Name;
}
public String getTopic(){
return Topic;
}
public String getDescription(){
return Description;
}
public void setName (String n){
Name= n;
}
public void setTopic (String T){
Topic= T;
}
public void setDescription (String D){
Description= D;
}
}
TestFeedback.java
public class TestFeedback {
public static void main(String[] args){
Feedback U1 = new Feedback ();
U1.setName("Ah Huat");
U1.setTopic ("Topic : Compliment");
U1.setDescription ("Your company has provided good services, and your website is well built.");
Feedback U2 = new Feedback ();
U2.setName ("Ah Hia");
U2.setTopic ("Topic : Suggestion");
U2.setDescription ("May I suggest that the company change the script of the website, as well as the fonts used for the word ? I find it hard to navigate your website. Thanks a lot");
System.out.println (U1.getName());
System.out.println (U1.getTopic());
System.out.println (U1.getDescription());
System.out.println (U2.getName());
System.out.println (U2.getTopic());
System.out.println (U2.getDescription());
}
}
I am weak in java, so can help me check have I fulfilled Part A, B and Part C or not
Or have I miss out any of the three parts or miss out any requirements
?