You can follow that example and get your requirement.
If you don't want the Last Activity date, you can just have a Two Options attribute and only update it if the value is false. In that way, the Account record won't be updated everytime an activity is created.