Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Javadocs #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions app/src/main/java/com/harpreet/notes_app/Modal/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,68 @@

public class Data {

//attrubutes of the "Notes" object
private String name;
private String description;
private String id;
private String date;

//empty constructor
public Data()
{}

//constructor for "Note" object
public Data(String name, String description, String id, String date) {
this.name = name;
this.description = description;
this.id = id;
this.date = date;
}

//returns this name/title of the note
//@return the name/title
public String getName() {
return name;
}

//returns the description thats related to the notes name/title
//@return the description of the notes name/title
public String getDescription() {
return description;
}

//returns the ID thats related to the note created
//@return the ID of the notes created
public String getId() {
return id;
}

//returns the Date thats related to the note created
//@return the Date of the notes created
public String getDate() {
return date;
}

//this sets the name of the note based on the user input field
//@param: the name for which what the notes title should be
public void setName(String name) {
this.name = name;
}

//this sets the description of the notes related to the title/name based on what the user input field
//@param: the description of the contents that is related to the name/title of the note
public void setDescription(String description) {
this.description = description;
}

//this sets the ID of the note when it is created automatically
//@param: the ID for which what the note created will be
public void setId(String id) {
this.id = id;
}

//this sets the Date of the note when it is created automatically
//@param: the Date for which what the note created will be
public void setDate(String data) {
this.date = date;
}
Expand Down