Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
14b1df8
Update README.md
oneili126 Mar 19, 2025
d0d2239
Delete README.md
oneili126 Mar 19, 2025
884c6a0
TestCases Sprint 1
oneili126 Mar 20, 2025
44dceb3
Merge pull request #1 from cararouth/oneili126-patch-2
oneili126 Mar 20, 2025
3a17197
Delete Sprint 1/TestCasesPlaceholder.txt
oneili126 Mar 20, 2025
d6514cc
Merge pull request #2 from cararouth/oneili126-patch-3
oneili126 Mar 20, 2025
5d2e4b6
First attempt at a main, and classes for pro 1
oneili126 Mar 24, 2025
40cb0ad
Merge pull request #3 from cararouth/oneili126-patch-4
oneili126 Mar 24, 2025
5e5d1e0
Add files via upload
oneili126 Mar 24, 2025
1c46fd7
Delete requirementPlaceholder.txt
oneili126 Mar 24, 2025
ddeeead
Delete Sprint 1/codePlaceHolder.txt
oneili126 Mar 24, 2025
c9155e3
Update Authentication.java
oneili126 Mar 25, 2025
788606b
Update Main.java
oneili126 Mar 25, 2025
15f5c1e
Update User.java
oneili126 Mar 25, 2025
a6b4089
Merge branch 'deHank:main' into main
oneili126 Mar 26, 2025
41d8ab0
Delete Sprint 1/CMSC 355 Test Cases.pdf
oneili126 Mar 27, 2025
e3ce56b
Test Cases
oneili126 Mar 27, 2025
58ee270
Cara
oneili126 Mar 27, 2025
97c528d
Cara
oneili126 Mar 27, 2025
3808270
Miya
oneili126 Mar 27, 2025
4b1f5f9
Zoya
oneili126 Mar 27, 2025
a1096d1
Create README.md
oneili126 Mar 27, 2025
0680de1
Shawn
oneili126 Mar 27, 2025
e18f63a
Add files via upload
oneili126 Apr 10, 2025
d39eb69
UML Diagrams
oneili126 Apr 27, 2025
d361dae
Merge pull request #4 from cararouth/oneili126-patch-5
oneili126 Apr 27, 2025
bc5da2a
Final
oneili126 Apr 27, 2025
24116c8
Create Video Link
oneili126 Apr 27, 2025
b34d21a
Test Cases Final
oneili126 Apr 27, 2025
86a1196
Update README.md
oneili126 Apr 27, 2025
cf41791
Delete Sprint 3/TestCasesPlaceholder.txt
oneili126 Apr 27, 2025
e5c6f6a
Delete Sprint 3/UMLDiagrams.txt
oneili126 Apr 27, 2025
22eff42
Delete Sprint 3/codePlaceHolder.txt
oneili126 Apr 27, 2025
023efef
Delete Sprint 3/videoPlaceholder.txt
oneili126 Apr 27, 2025
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
Binary file added CMSC 355 Requirements (1).pdf
Binary file not shown.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
My groupmembers are:
- XXXX
- XXXX
- XXXX
- XXXX
This is a project for CMSC 355 - Software Engineering.
We attempted to make a medicine adherence system. It is a full stack program but very rudimentary as there was not much alloted time throughout the semester. The entirety of this project was coded in IntelliJIDE with each of the initial processes divided amongst the group.
----------------------------------------------------
CSMC 355 Group Members:


------------------ Fill in some information about your project under this ------------------
- Zoya Ahktar
- Miya Collingwood
- Inayah O’Neil
- Cara Routh
- Shawn Watson
37 changes: 37 additions & 0 deletions Sprint 1/3.1 and 3.2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Medication Vaildation System 3.1 and 3.2 */
import java.util;
import java.util.HashMap;
import java.util.Scanner;

public class ValidateMedication {
private static final HashMap<String, Boolean> vaildMeds = new HashMap<>();
static {
validMeds.put("Tyelnol", true);
}
public class TimeMedsTaken{
private static final HashMap<String, Boolean> TimeVal = new HashMap<>();

static {
TimeVal.put("2:00 PM", true);
}
}
}

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter Medication name");
String input = scan.nextLine();
if (validMeds(input)){
System.out.println("Medication Logged: Confirmed");
System.out.println("Enter the time the medication was taken");
String inputtime = scan.nextLine();
if (TimeVal(inputtime)){
System.out.println("Medication Time Logged: Confirm Positive Status");
} else{
System.out.println("Medication Time Logged: Confirm Negative Status");
}
} else {
System.out.println("Input was incorrect. Please Try Again");
}

}
59 changes: 59 additions & 0 deletions Sprint 1/Authentication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Medical Adherence System
* Sprint 1
* CMSC 355 - Fundamentals of Software Engineering
*
*/

import java.util.HashMap;

public class Authentication {
private HashMap<String, User> users;

//creates hashmap using current user
public Authentication(){
this.users = new HashMap<>();
}

/**
* Checks availability of username
* @param username
* @return false if username is taken, true if username is available
*/
public boolean usernameAvail(String username){
if(users.containsKey(username)){
System.out.println("Username already taken.");
return false;
}
else {
return true;
}
}

public boolean register(String username, String password) {
if (users.containsKey(username)) {
System.out.println("Username already taken.");
return false;
}
users.put(username, new User(username,password));
System.out.println("User registerd successfully!");
return true;
}

public boolean login(String username, String password) {
if (!users.containsKey(username)){
System.out.println("User not found");
return false;
}
User user = users.get(username);
if (user.checkPassword(password)) {
System.out.println("login successful!");
return true;
}
else {
System.out.println("Incorrect password.");
return false;
}
}

}
Binary file added Sprint 1/CMSC 355 Test Cases.pdf
Binary file not shown.
50 changes: 50 additions & 0 deletions Sprint 1/DoctorName.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import java.util.*;

public class DoctorName {
private static Map<String, List<String>> doctorMedications = new HashMap<>();

public static void main(String[] args) {
// test data
doctorMedications.put("John Smith", Arrays.asList("Aspirin", "Ibuprofen"));
doctorMedications.put("Jane Doe", Arrays.asList("Paracetamol"));

Scanner scanner = new Scanner(System.in);

// Get doctor name from user
System.out.print("Enter doctor's first name: ");
String firstName = scanner.nextLine().trim();

System.out.print("Enter doctor's last name: ");
String lastName = scanner.nextLine().trim();

String fullName = firstName + " " + lastName;

if (doctorMedications.containsKey(fullName)) {
System.out.println("Doctor found: " + fullName);
System.out.println("Menu Options:");
System.out.println("1. View Medications");
System.out.println("2. Enter a new Rx number");

System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
scanner.nextLine(); //newline

switch (choice) {
case 1:
System.out.println("Medications: " + doctorMedications.get(fullName));
break;
case 2:
System.out.print("Enter new Rx number: ");
String rxNumber = scanner.nextLine();
System.out.println("Rx number " + rxNumber + " has been added.");
break;
default:
System.out.println("Invalid choice.");
}
} else {
System.out.println("Doctor not found in the system.");
}

scanner.close();
}
}
89 changes: 89 additions & 0 deletions Sprint 1/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* Medical Adherence System
* Sprint 1
* CMSC 355 - Fundamentals of Software Engineering
*
*/
import java.util.Scanner;

public class Main {

public static void main(String[] args){
login(); //call in the login function

}

public static void login() {

Authentication authentication = new Authentication();
Scanner scr = new Scanner(System.in);

while (true){
System.out.println("\n1. Register\n2. Login\n3. Exit");
System.out.println("Choose an option: ");
String choice = scr.nextLine();

if (choice.equals("1")){ //Register
System.out.println("Enter username: ");
String username = scr.nextLine();

if (authentication.usernameAvail(username)) {
System.out.println("Enter password: ");
String password = scr.nextLine();
authentication.register(username, password);
}
}
else if (choice.equals("2")){ //Login
System.out.println("Enter username: ");
String username = scr.nextLine();

System.out.println("Enter password: ");
String password = scr.nextLine();

if (authentication.login(username,password)){
home();
}
}
else { //Exit
System.out.println("Goodbye!");
break;
}
}
scr.close();
}

/**
* serves as home page
*/
public static void home() {
Scanner scr = new Scanner(System.in);

while (true){
System.out.println("\n1. Add User Info \n2. Add Rx Info \n3. Log Medicine \n4. Pull Medicine Adherence Report \n5. Exit");
System.out.println("Choose an option: ");
String choice = scr.nextLine();

if (choice.equals("1")){ //Add User Info
System.out.println("Enter username: ");
String username = scr.nextLine();
}
else if (choice.equals("2")){ //Add Rx Info
System.out.println("Enter username: ");
String username = scr.nextLine();
}
else if (choice.equals("3")){ //Log Medicine
System.out.println("Enter username: ");
String username = scr.nextLine();
}
else if (choice.equals("4")){ //Pull Med report
System.out.println("Enter username: ");
String username = scr.nextLine();
}
else { //Exit
System.out.println("Goodbye!");
break;
}
}
scr.close();
}
}
17 changes: 17 additions & 0 deletions Sprint 1/MedicineReport.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class MedicineReport {
public static void main(String[] args) {
System.out.println("Generating medicine report...");

String medication = "Aspirin";
String schedule = "Twice a day";
String adherence = "90%";
String sideEffect = "None";

System.out.println("Medication: " + medication);
System.out.println("Schedule: " + schedule);
System.out.println("Adherence: " + adherence);
System.out.println("Side Effects: " + sideEffect);

System.out.println("Report ready to view or download.");
}
}
81 changes: 81 additions & 0 deletions Sprint 1/PerscriptionNumberVerification.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import java.util.*;

public class PrescriptionNumberVerification {
private static Map<String, Prescription> rxStore = new HashMap<>();

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

while (true) {
System.out.println("Menu Options:");
System.out.println("1. Add a new prescription");
System.out.println("2. Retrieve medication details");
System.out.println("3. Exit");

System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
scanner.nextLine(); // Consume newline

switch (choice) {
case 1:
System.out.print("Enter Rx number: ");
String rxNumber = scanner.nextLine().trim();

System.out.print("Enter medication name: ");
String medicationName = scanner.nextLine().trim();

System.out.print("Enter times to take the medication: ");
String times = scanner.nextLine().trim();

rxStore.put(rxNumber, new Prescription(rxNumber, medicationName, times));
System.out.println("Prescription added successfully.");
break;

case 2:
System.out.print("Enter Rx number: ");
String searchRxNumber = scanner.nextLine().trim();

if (rxStore.containsKey(searchRxNumber)) {
Prescription prescription = rxStore.get(searchRxNumber);
System.out.println("Medication: " + prescription.getMedicationName());
System.out.println("Times: " + prescription.getTimes());
} else {
System.out.println("Rx number not found.");
}
break;

case 3:
System.out.println("Exiting the system.");
scanner.close();
return;

default:
System.out.println("Invalid choice. Please try again.");
}
}
}
}

class Prescription {
private String rxNumber;
private String medicationName;
private String times;

public Prescription(String rxNumber, String medicationName, String times) {
this.rxNumber = rxNumber;
this.medicationName = medicationName;
this.times = times;
}

public String getRxNumber() {
return rxNumber;
}

public String getMedicationName() {
return medicationName;
}

public String getTimes() {
return times;
}
}
Loading