Skip to content

A basic calculator in Java implemented using the MVC design pattern.

License

Notifications You must be signed in to change notification settings

em1lylauren/MVC-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC Calculator

A calculator application made with Java Swing using the MVC (Model-View-Controller) design pattern.

  • Keyboard AND mouse click support
  • Colour scheme heavily inspired by the basic iPhone calculator app
  • Code consists of 3 structural classes (Controller, View, Model), one main class, and one custom JButton class

image

Keyboard Controls

  • Digits 0-9 represent their respective numbers on the keyboard
  • Operations (+, -, *, /) for addition, subtraction, multiplication, or division
  • Backspace, Del, or C to clear the display
  • Enter or = to compute the result
  • Shift to change the sign
  • % to compute number as a decimal percent of 100 (eg. 50 = 0.5)