<file_sep># Developing-Data-Products-Assignment
Final project, developing data products
An app to calculate area of a rectangle or square.
<file_sep>library(shiny)

shinyServer( 
  function(input, output) {
    output$length <- renderText({as.numeric(input$length)})
    output$breadth <- renderText({as.numeric(input$length)})
    output$area <- renderText({
      # if (input$goButton == 0) "Please enter a number"
      # else if (input$goButton >= 1) numberGuessed(as.numeric(input$guess), number)
      output$area <- renderPrint ({as.numeric(input$length) * as.numeric(input$breadth)})
    })
  }
)
<file_sep>library(shiny)

shinyUI( pageWithSidebar(
    headerPanel("Rectangle Area Calculation"),
    
    sidebarPanel(
        textInput (inputId = 'length', 'Enter Length', value = '0'),
        textInput (inputId = 'breadth', 'Enter Width', value = '0')
    ), 
    mainPanel(
        h4('The Area of your rectangle is'),
        verbatimTextOutput("area")
    )
)
)

