package Ġcom . zi em app . john zi eman . m yst ory book . view models Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . zi em app . john zi eman . m yst ory book . Story book Repository Ċ import Ġcom . zi em app . john zi eman . m yst ory book . models . Story Ċ Ċ class ĠStory book List ViewModel : ĠViewModel () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġstory book Repository : ĠStory book Repository Ġ= ĠStory book Repository . get () ĊĠĠĠ Ġval Ġstory List LiveData Ġ= Ġstory book Repository . get St ories () ĊĠĠĠ Ġfun Ġadd Story ( story : ĠStory ){ ĊĠĠĠĠĠĠĠ Ġstory book Repository . add Story ( story ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdelete ( story : ĠStory ){ ĊĠĠĠĠĠĠĠ Ġstory book Repository . delete Story ( story ) ĊĠĠĠ Ġ} Ċ }