Skip to content

jmfigueroa/Java_Spotify_Assignment

Repository files navigation

Spotify Lab Assignment


Resources Used

Java Objects

Strings

StackOverflow: Split string with dot as delimiter - b/c regex

ArrayList

Console Operations


Pseudocode

Written in Mermaid.js syntax which outputs the following/attached flowchart.

graph TD
    A[START] -->|validate user input| B{{GET user creds}}
    B --> C[(READ userAccount from file)]
    C --> D[IF authenticated]
    C --> |3 failed attempts| X[ELSE exit program]
    D --> E[DISPLAY nav menu]
    E --> F{{GET userNavSelection}}
    F --> |validate user input| G[IF View current plan]
    F --> |validate user input| H[ELSE IF modify current plan]
    F -.-> X
    G --> I[DISPLAY current plan]
    I --> J{{GET userAmount to spend}}
    J --> |validate user input| K[IF userAmount >= currentPlanPrice]
    K --> L[DISPLAY Preset 'awesome' message]
    L -.-> F
    J --> |validate user input| M[ELSE IF userAmount < currentPlanPrice]
    M --> N[DISPLAY Preset 'sub on hold' message]
    H --> O{{GET userPlanChange}}
        O --> |validate user input| R[UPDATE userAccount with new plan]
    R -.-> F
    O --> |validate user input| P[IF no change]
    O --> |validate user input| Q[IF 'student' plan]
    Q --> T{{GET userEmail}}
    T --> |validate user input| U[IF userEmail includes '.edu']
    U --> V[DISPLAY Preset Premium Student message]
    T --> |validate user input / 1 failed attempt| W[DISPLAY Preset 'not eligible' message]
    V -.-> F
    W -.-> U
    W -.-> F
    ```
    
  ![alt flowchart](./mermaid-diagram.png)
    
    
    
  ###  Mermaid Config

{ "theme": "default" }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages