Skip to content

ga-wdi-remote/js-hw-dom-loan-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

LoanBot

The year is 2025 and the entire banking system has been delegated to robots. You are forced to deal with your new loan officer aptly named LoanBot.

Robot Banker

Introduction

Your homework is to create an interactive ChatBot lending program called LoanBot.

Setup

You will be doing all of your work inside of the homework directory. We have provided the index.html, script.js, and style.css for you already.

User Interface

Whenever the user types in the prompt field and presses the return/enter key, append a <li> with the value of the text value of the prompt to the ul#log, and then reset the value of the prompt. LoanBot's response should be appended as <li> tags beneath the prompt in the ul#log. Create each <li> with three possible classes:

  • prompt: command from the prompt
  • .emote: Indicates a LoanBot action
  • loanBot: For LoanBot's replies

(Hint: You will be using an event listener to capture the keystrokes)

Commands

How to read the examples:

This is the command you type

  • This is LoanBot's response

1

LoanBot starts off with $10,000.

purse

  • LoanBot has 10000 dollars

2

LoanBot should be able to loan money.

loan Bobby 50 dollars

  • LoanBot gives Bobby 50 dollars Be sure to update the purse

3

LoanBot keeps track of his debts

ledger

-LoanBot pulls out ledger

  • Bobby owes you 50 dollars
  • Jaden owes you 30 dollars

4

LoanBot can collect interest on debts and set interest rate

collect interest

  • LoanBot collects interest at 35%
  • Bobby now owes me 67.50 dollars
  • Jaden now owes me 40.50 dollars

set interest rate at 15%

  • Loanbot adjusts interest rate from 35% to 15%

5

LoanBot can collect debts

collect 50 dollars from Bobby

  • LoanBot opens his purse and collects Bobby's 50 dollars of Bobby's debt

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published