https://github.com/balikuddembe/spring_calculator_app
Using Spring to design a calculator App
https://github.com/balikuddembe/spring_calculator_app
Last synced: 3 months ago
JSON representation
Using Spring to design a calculator App
- Host: GitHub
- URL: https://github.com/balikuddembe/spring_calculator_app
- Owner: Balikuddembe
- Created: 2022-05-09T15:28:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-09T15:39:50.000Z (about 3 years ago)
- Last Synced: 2025-01-15T20:20:45.702Z (4 months ago)
- Language: Java
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring_Calculator_App
Using Spring to design a calculator AppCreate a Spring application named spring-calculator to create a calculator app.
Create the main package com.spring.projects.calculator under the project src folder. All the code files should be contained in this package. You may create relevant sub-packages under this main package.
Create a sub-package beans.arithmeticoperations under the main package. Create a class called BasicArithmeticOperations that has two data members num1 and num2 and four non-parameterized methods called add, subtract, multiply, and divide to perform addition, subtraction, multiplication, and division of two numbers respectively. The functions will print their result and throw exceptions wherever required. Include getters and setters and the toString method.
Configure the bean using XML-based configuration to provide the values of num1 and num2.
Create the driver class MainApp under the main package. In the driver class, have a switch-case to call the respective function of the calculator depending on user input.
Submissions:
=>Bean class definition
=>MainApp definition
=>XML configuration
=>Output screenshot [OPTIONAL]