Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KamalrajRajaraman authored Aug 26, 2023
1 parent f667988 commit a9a4c19
Show file tree
Hide file tree
Showing 40 changed files with 2,311 additions and 494 deletions.
50 changes: 29 additions & 21 deletions java2-R-Kamalraj-cdc-v3/src/edu/disease/asn1/Disease.java
Original file line number Diff line number Diff line change
@@ -1,49 +1,56 @@
package edu.disease.asn1;

import java.util.UUID;
/**
* A class that represents Disease.
* <li>
* Disease has the following properties:
* java.util.UUID diseaseId
* String name
* </li>
*/

/**
* A class that represents Disease.
* <li>Disease has the following properties: java.util.UUID diseaseId String
* name</li>
*/
public class Disease {
private UUID diseaseId;
private UUID diseaseId;
private String name;

/**
* Returns diseaseId of the Disease Object
* @return UUID type diseaseId of the Disease Object
* Returns diseaseId of the Disease Object
*
* @return UUID type diseaseId of the Disease Object
*/
public UUID getDiseaseId() {
return diseaseId;
}

/**
* Instantiate diseaseId of Disease class Object
* @param diseaseId the UUID reference
*
* @param diseaseId the UUID reference
*/
public void setDiseaseId(UUID diseaseId) {
this.diseaseId = diseaseId;
}

/**
* Returns name of the Disease class Object
*
* @return String
*/
public String getName() {
return name;
}

/**
* Instantiate name of Disease class Object
* @param name A reference of String which is used to Instantiate
* name of Disease class Object
*
* @param name A reference of String which is used to Instantiate name of
* Disease class Object
*/
public void setName(String name) {
this.name = name;
}

/**
* Returns a hash code value for the object based on
* diseaseId property of the Disease class
* Returns a hash code value for the object based on diseaseId property of the
* Disease class
*/
@Override
public int hashCode() {
Expand All @@ -52,7 +59,7 @@ public int hashCode() {
result = prime * result + ((diseaseId == null) ? 0 : diseaseId.hashCode());
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj)
Expand All @@ -69,14 +76,15 @@ public boolean equals(Object obj) {
return false;
return true;
}

/**
* Returns a string representation of the Disease object.
* this method returns a string equal to the value of:
* Disease [diseaseId=" + diseaseId + ", name=" + name + "]
* Returns a string representation of the Disease object. this method returns a
* string equal to the value of: Disease [diseaseId=" + diseaseId + ", name=" +
* name + "]
*/
@Override
public String toString() {
return "Disease [diseaseId=" + diseaseId + ", name=" + name + "]";
}

}
76 changes: 42 additions & 34 deletions java2-R-Kamalraj-cdc-v3/src/edu/disease/asn1/Exposure.java
Original file line number Diff line number Diff line change
@@ -1,79 +1,87 @@
package edu.disease.asn1;


import java.time.LocalDateTime;
import java.util.UUID;

/**
* A class that represents Exposure.
* <li>
* class Exposure with the following properties
*java.util.UUID patientld
* java.time.LocalDateTime dateTime
* String exposureType
* @author KAMALRAJ
* A class that represents Exposure.
* <li>class Exposure with the following properties java.util.UUID patientld
* java.time.LocalDateTime dateTime String exposureType
*
* @author KAMALRAJ
*
*/
public class Exposure {


public class Exposure {

private UUID patientId;
private LocalDateTime dateTime;
private String exposureType;

/**
* Initializes a newly created {@code Exposure} object.
*
*/
public Exposure(UUID patientId) {
this.patientId=patientId;
this.patientId = patientId;
}

/**
* Returns patientId
* @return patientId
*
* @return patientId
*/
public UUID getPatientId() {
return patientId;
}

/**
* Returns dateTime
* @return dateTime
*
* @return dateTime
*/
public LocalDateTime getDateTime() {
return dateTime;
}

/**
* Instantiate dateTime
* @param dateTime
*
* @param dateTime
*/
public void setDataTime(LocalDateTime dateTime) {
public void setDateTime(LocalDateTime dateTime) {
this.dateTime = dateTime;
}

/**
* Returns exposureType
*
* @return exposureType
*/
public String getExposureType() {
return exposureType;
}

/**
* The setExposureType set exposure Type property should only be allowed to accept the values, "D" for direct exposure
* or "I" for indirect exposure.
* The setExposureType set exposure Type property should only be allowed to
* accept the values, "D" for direct exposure or "I" for indirect exposure.
*
* @param exposureType the String reference
* @param exposureType the String reference
*
* @throws Throw an IllegalArgumentException with the appropriate message within
* the setExposure Type method if the supplied exposure type is
* not "D" and not "I".
*
* @throws Throw an IllegalArgumentException with the appropriate message
* within the setExposure Type method if the supplied exposure type is not "D" and not "I".
*/
public void setExposureType(String exposureType) {
if(exposureType.equals("D")||exposureType.equals("I")) {
if (exposureType.equals("D") || exposureType.equals("I")) {
this.exposureType = exposureType;
}
else {
} else {
throw new IllegalArgumentException("Supplied exposure type is not\"D\" and not \"T\"");
}
}

/**
*Generate hashCode using the patientId, and dateTime properties .
* Generate hashCode using the patientId, and dateTime properties .
*/
@Override
public int hashCode() {
Expand All @@ -83,12 +91,11 @@ public int hashCode() {
result = prime * result + ((patientId == null) ? 0 : patientId.hashCode());
return result;


}

@Override
public boolean equals(Object obj) {

if (this == obj)
return true;
if (obj == null)
Expand All @@ -108,15 +115,16 @@ public boolean equals(Object obj) {
return false;
return true;
}

/**
* Returns a string representation of the object.
* In other words, this method returns a string equal to thevalue of:
* <li>
* Exposure [patientId= + patientId + ", dateTime=" + dateTime + ", exposureType=" + exposureType + "]
* Returns a string representation of the object. In other words, this method
* returns a string equal to thevalue of:
* <li>Exposure [patientId= + patientId + ", dateTime=" + dateTime + ",
* exposureType=" + exposureType + "]
*/
@Override
public String toString() {
return "Exposure [patientId=" + patientId + ", dateTime=" + dateTime + ", exposureType=" + exposureType + "]";
}

}
Loading

0 comments on commit a9a4c19

Please sign in to comment.