Commit 25abb541 authored by nargessalehi98's avatar nargessalehi98

add final project

parent 67347509
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Main</title> <title>Main</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="declaration: class: Main"> <meta name="description" content="declaration: class: Main">
<meta name="generator" content="javadoc/ClassWriterImpl"> <meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
......
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Model</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-05-06">
<meta name="description" content="declaration: class: Model">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<h1 title="Class Model" class="title">Class Model</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance">Model</div>
</div>
<section class="description">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="View.html" title="class in &lt;Unnamed&gt;">View</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Model</span>
extends java.lang.Object</pre>
<div class="block">this class keep data</div>
</section>
<section class="summary">
<ul class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li class="blockList">
<section class="constructorSummary"><a id="constructor.summary">
<!-- -->
</a>
<h2>Constructor Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Model</a></span>()</code></th>
<td class="colLast">
<div class="block">creat a new Model - set default values</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a><code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li class="blockList">
<section class="constructorDetails"><a id="constructor.detail">
<!-- -->
</a>
<h2>Constructor Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;()">Model</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">Model</span>()</div>
<div class="block">creat a new Model - set default values</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>View</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-05-06">
<meta name="description" content="declaration: class: View">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<h1 title="Class View" class="title">Class View</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance"><a href="Model.html" title="class in &lt;Unnamed&gt;">Model</a>
<div class="inheritance">View</div>
</div>
</div>
<section class="description">
<hr>
<pre>public class <span class="typeNameLabel">View</span>
extends <a href="Model.html" title="class in &lt;Unnamed&gt;">Model</a></pre>
<div class="block">this class present a Calculator GUI</div>
</section>
<section class="summary">
<ul class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li class="blockList">
<section class="constructorSummary"><a id="constructor.summary">
<!-- -->
</a>
<h2>Constructor Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">View</a></span>()</code></th>
<td class="colLast">
<div class="block">creat a new Calculator</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#operation()">operation</a></span>()</code></th>
<td class="colLast">
<div class="block">this method calculate - for each operation</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a><code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li class="blockList">
<section class="constructorDetails"><a id="constructor.detail">
<!-- -->
</a>
<h2>Constructor Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;()">View</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">View</span>()</div>
<div class="block">creat a new Calculator</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="operation()">operation</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">java.lang.String</span>&nbsp;<span class="memberName">operation</span>()</div>
<div class="block">this method calculate - for each operation</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String of result</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>All Classes</title> <title>All Classes</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="class index"> <meta name="description" content="class index">
<meta name="generator" content="javadoc/AllClassesIndexWriter"> <meta name="generator" content="javadoc/AllClassesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
...@@ -79,15 +79,21 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -79,15 +79,21 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
</thead> </thead>
<tbody> <tbody>
<tr class="altColor" id="i0"> <tr class="altColor" id="i0">
<td class="colFirst"><a href="Calculator.html" title="class in &lt;Unnamed&gt;">Calculator</a></td> <td class="colFirst"><a href="Main.html" title="class in &lt;Unnamed&gt;">Main</a></td>
<th class="colLast" scope="row"> <th class="colLast" scope="row">
<div class="block">this class present a Calculator GUI</div> <div class="block">this class run calculator</div>
</th> </th>
</tr> </tr>
<tr class="rowColor" id="i1"> <tr class="rowColor" id="i1">
<td class="colFirst"><a href="Main.html" title="class in &lt;Unnamed&gt;">Main</a></td> <td class="colFirst"><a href="Model.html" title="class in &lt;Unnamed&gt;">Model</a></td>
<th class="colLast" scope="row"> <th class="colLast" scope="row">
<div class="block">this class run calculator</div> <div class="block">this class keep data</div>
</th>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><a href="View.html" title="class in &lt;Unnamed&gt;">View</a></td>
<th class="colLast" scope="row">
<div class="block">this class present a Calculator GUI</div>
</th> </th>
</tr> </tr>
</tbody> </tbody>
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>All Packages</title> <title>All Packages</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="package index"> <meta name="description" content="package index">
<meta name="generator" content="javadoc/AllPackagesIndexWriter"> <meta name="generator" content="javadoc/AllPackagesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Constant Field Values</title> <title>Constant Field Values</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="summary of constants"> <meta name="description" content="summary of constants">
<meta name="generator" content="javadoc/ConstantsSummaryWriterImpl"> <meta name="generator" content="javadoc/ConstantsSummaryWriterImpl">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Deprecated List</title> <title>Deprecated List</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="deprecated elements"> <meta name="description" content="deprecated elements">
<meta name="generator" content="javadoc/DeprecatedListWriter"> <meta name="generator" content="javadoc/DeprecatedListWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>API Help</title> <title>API Help</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="help"> <meta name="description" content="help">
<meta name="generator" content="javadoc/HelpWriter"> <meta name="generator" content="javadoc/HelpWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>C-Index</title> <title>M-Index</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="index: C"> <meta name="description" content="index: M">
<meta name="generator" content="javadoc/SplitIndexWriter"> <meta name="generator" content="javadoc/SplitIndexWriter">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.css" title="Style"> <link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.css" title="Style">
...@@ -67,21 +67,29 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -67,21 +67,29 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<div class="header"> <div class="header">
<h1>Index</h1> <h1>Index</h1>
</div> </div>
<div class="contentContainer"><a href="index-1.html">C</a>&nbsp;<a href="index-2.html">M</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a><a id="I:C"> <div class="contentContainer"><a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a><a id="I:M">
<!-- --> <!-- -->
</a> </a>
<h2 class="title">C</h2> <h2 class="title">M</h2>
<dl> <dl>
<dt><a href="../Calculator.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Calculator</span></a> - Class in <a href="../package-summary.html">&lt;Unnamed&gt;</a></dt> <dt><span class="memberNameLink"><a href="../Main.html#main(java.lang.String%5B%5D)">main(String[])</a></span> - Static method in class <a href="../Main.html" title="class in &lt;Unnamed&gt;">Main</a></dt>
<dd>&nbsp;</dd>
<dt><a href="../Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a> - Class in <a href="../package-summary.html">&lt;Unnamed&gt;</a></dt>
<dd> <dd>
<div class="block">this class present a Calculator GUI</div> <div class="block">this class run calculator</div>
</dd> </dd>
<dt><span class="memberNameLink"><a href="../Calculator.html#%3Cinit%3E()">Calculator()</a></span> - Constructor for class <a href="../Calculator.html" title="class in &lt;Unnamed&gt;">Calculator</a></dt> <dt><span class="memberNameLink"><a href="../Main.html#%3Cinit%3E()">Main()</a></span> - Constructor for class <a href="../Main.html" title="class in &lt;Unnamed&gt;">Main</a></dt>
<dd>&nbsp;</dd>
<dt><a href="../Model.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Model</span></a> - Class in <a href="../package-summary.html">&lt;Unnamed&gt;</a></dt>
<dd> <dd>
<div class="block">creat a new Calculator</div> <div class="block">this class keep data</div>
</dd>
<dt><span class="memberNameLink"><a href="../Model.html#%3Cinit%3E()">Model()</a></span> - Constructor for class <a href="../Model.html" title="class in &lt;Unnamed&gt;">Model</a></dt>
<dd>
<div class="block">creat a new Model - set default values</div>
</dd> </dd>
</dl> </dl>
<a href="index-1.html">C</a>&nbsp;<a href="index-2.html">M</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a></div> <a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a></div>
</main> </main>
<footer role="contentinfo"> <footer role="contentinfo">
<nav role="navigation"> <nav role="navigation">
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>M-Index</title> <title>O-Index</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="index: M"> <meta name="description" content="index: O">
<meta name="generator" content="javadoc/SplitIndexWriter"> <meta name="generator" content="javadoc/SplitIndexWriter">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.css" title="Style"> <link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.css" title="Style">
...@@ -67,21 +67,17 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -67,21 +67,17 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<div class="header"> <div class="header">
<h1>Index</h1> <h1>Index</h1>
</div> </div>
<div class="contentContainer"><a href="index-1.html">C</a>&nbsp;<a href="index-2.html">M</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a><a id="I:M"> <div class="contentContainer"><a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a><a id="I:O">
<!-- --> <!-- -->
</a> </a>
<h2 class="title">M</h2> <h2 class="title">O</h2>
<dl> <dl>
<dt><span class="memberNameLink"><a href="../Main.html#main(java.lang.String%5B%5D)">main(String[])</a></span> - Static method in class <a href="../Main.html" title="class in &lt;Unnamed&gt;">Main</a></dt> <dt><span class="memberNameLink"><a href="../View.html#operation()">operation()</a></span> - Method in class <a href="../View.html" title="class in &lt;Unnamed&gt;">View</a></dt>
<dd>&nbsp;</dd>
<dt><a href="../Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a> - Class in <a href="../package-summary.html">&lt;Unnamed&gt;</a></dt>
<dd> <dd>
<div class="block">this class run calculator</div> <div class="block">this method calculate - for each operation</div>
</dd> </dd>
<dt><span class="memberNameLink"><a href="../Main.html#%3Cinit%3E()">Main()</a></span> - Constructor for class <a href="../Main.html" title="class in &lt;Unnamed&gt;">Main</a></dt>
<dd>&nbsp;</dd>
</dl> </dl>
<a href="index-1.html">C</a>&nbsp;<a href="index-2.html">M</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a></div> <a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a></div>
</main> </main>
<footer role="contentinfo"> <footer role="contentinfo">
<nav role="navigation"> <nav role="navigation">
......
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>V-Index</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-05-06">
<meta name="description" content="index: V">
<meta name="generator" content="javadoc/SplitIndexWriter">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
<script type="text/javascript" src="../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../script-dir/jquery-ui.js"></script>
</head>
<body class="split-index">
<script type="text/javascript">var pathtoroot = "../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h1>Index</h1>
</div>
<div class="contentContainer"><a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a><a id="I:V">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><a href="../View.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">View</span></a> - Class in <a href="../package-summary.html">&lt;Unnamed&gt;</a></dt>
<dd>
<div class="block">this class present a Calculator GUI</div>
</dd>
<dt><span class="memberNameLink"><a href="../View.html#%3Cinit%3E()">View()</a></span> - Constructor for class <a href="../View.html" title="class in &lt;Unnamed&gt;">View</a></dt>
<dd>
<div class="block">creat a new Calculator</div>
</dd>
</dl>
<a href="index-1.html">M</a>&nbsp;<a href="index-2.html">O</a>&nbsp;<a href="index-3.html">V</a>&nbsp;<br><a href="../allclasses-index.html">All&nbsp;Classes</a>&nbsp;<a href="../allpackages-index.html">All&nbsp;Packages</a></div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Generated Documentation (Untitled)</title> <title>Generated Documentation (Untitled)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="index redirect"> <meta name="description" content="index redirect">
<meta name="generator" content="javadoc/IndexRedirectWriter"> <meta name="generator" content="javadoc/IndexRedirectWriter">
<link rel="canonical" href="Main.html"> <link rel="canonical" href="Main.html">
......
memberSearchIndex = [{"p":"<Unnamed>","c":"Calculator","l":"Calculator()","url":"%3Cinit%3E()"},{"p":"<Unnamed>","c":"Main","l":"Main()","url":"%3Cinit%3E()"},{"p":"<Unnamed>","c":"Main","l":"main(String[])","url":"main(java.lang.String[])"}] memberSearchIndex = [{"p":"<Unnamed>","c":"Main","l":"Main()","url":"%3Cinit%3E()"},{"p":"<Unnamed>","c":"Main","l":"main(String[])","url":"main(java.lang.String[])"},{"p":"<Unnamed>","c":"Model","l":"Model()","url":"%3Cinit%3E()"},{"p":"<Unnamed>","c":"View","l":"operation()"},{"p":"<Unnamed>","c":"View","l":"View()","url":"%3Cinit%3E()"}]
\ No newline at end of file \ No newline at end of file
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>Class Hierarchy</title> <title>Class Hierarchy</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="class tree"> <meta name="description" content="class tree">
<meta name="generator" content="javadoc/TreeWriter"> <meta name="generator" content="javadoc/TreeWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
...@@ -73,8 +73,12 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -73,8 +73,12 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<ul> <ul>
<li class="circle">java.lang.Object <li class="circle">java.lang.Object
<ul> <ul>
<li class="circle"><a href="Calculator.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Calculator</span></a></li>
<li class="circle"><a href="Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a></li> <li class="circle"><a href="Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a></li>
<li class="circle"><a href="Model.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Model</span></a>
<ul>
<li class="circle"><a href="View.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">View</span></a></li>
</ul>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title>&lt;Unnamed&gt;</title> <title>&lt;Unnamed&gt;</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="declaration: package: &lt;unnamed&gt;"> <meta name="description" content="declaration: package: &lt;unnamed&gt;">
<meta name="generator" content="javadoc/PackageWriterImpl"> <meta name="generator" content="javadoc/PackageWriterImpl">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
...@@ -82,15 +82,21 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -82,15 +82,21 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
</thead> </thead>
<tbody> <tbody>
<tr class="altColor"> <tr class="altColor">
<th class="colFirst" scope="row"><a href="Calculator.html" title="class in &lt;Unnamed&gt;">Calculator</a></th> <th class="colFirst" scope="row"><a href="Main.html" title="class in &lt;Unnamed&gt;">Main</a></th>
<td class="colLast"> <td class="colLast">
<div class="block">this class present a Calculator GUI</div> <div class="block">this class run calculator</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="rowColor">
<th class="colFirst" scope="row"><a href="Main.html" title="class in &lt;Unnamed&gt;">Main</a></th> <th class="colFirst" scope="row"><a href="Model.html" title="class in &lt;Unnamed&gt;">Model</a></th>
<td class="colLast"> <td class="colLast">
<div class="block">this class run calculator</div> <div class="block">this class keep data</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="View.html" title="class in &lt;Unnamed&gt;">View</a></th>
<td class="colLast">
<div class="block">this class present a Calculator GUI</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<!-- NewPage --> <!-- NewPage -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- Generated by javadoc (13.0.2) on Thu Apr 30 18:11:38 IRDT 2020 --> <!-- Generated by javadoc (13.0.2) on Wed May 06 19:49:07 IRDT 2020 -->
<title> Class Hierarchy</title> <title> Class Hierarchy</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-04-30"> <meta name="dc.created" content="2020-05-06">
<meta name="description" content="tree: package: &lt;unnamed&gt;"> <meta name="description" content="tree: package: &lt;unnamed&gt;">
<meta name="generator" content="javadoc/PackageTreeWriter"> <meta name="generator" content="javadoc/PackageTreeWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
...@@ -73,8 +73,12 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); ...@@ -73,8 +73,12 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<ul> <ul>
<li class="circle">java.lang.Object <li class="circle">java.lang.Object
<ul> <ul>
<li class="circle"><a href="Calculator.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Calculator</span></a></li>
<li class="circle"><a href="Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a></li> <li class="circle"><a href="Main.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Main</span></a></li>
<li class="circle"><a href="Model.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">Model</span></a>
<ul>
<li class="circle"><a href="View.html" title="class in &lt;Unnamed&gt;"><span class="typeNameLink">View</span></a></li>
</ul>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>
......
typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"<Unnamed>","l":"Calculator"},{"p":"<Unnamed>","l":"Main"}] typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"<Unnamed>","l":"Main"},{"p":"<Unnamed>","l":"Model"},{"p":"<Unnamed>","l":"View"}]
\ No newline at end of file \ No newline at end of file
File added
import javax.swing.*;
import java.awt.*;
/**
* this class present a Calculator GUI
* @author Narges Salehi
*/
public class Calculator {
//creat a new JFrame for calculator frame
JFrame calcFrame;
/**
* creat a new Calculator
*/
public Calculator() {
//new JFrame
calcFrame = new JFrame("AUTCalculator");
//set size for frame
calcFrame.setSize(400, 500);
//set location of frame in your screen
calcFrame.setLocation(550, 250);
//make window not resizable
calcFrame.setResizable(false);
//set a layout for calculator
calcFrame.setLayout(new GridLayout(2,0,0,0));
calcFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//make window visible
calcFrame.setVisible(true);
//creat a new JPanel for standard calculator
JPanel p1 = new JPanel();
//set a layout for panel
p1.setLayout(new GridLayout(5, 4));
//creat a new JPanel for scientific calculator
JPanel p2 = new JPanel();
//set a layout for panel
p2.setLayout(new GridLayout(5, 5));
//creat a tab to add panels
JTabbedPane Calc = new JTabbedPane();
//set bounds of tab
Calc.setBounds(0, 100, 400, 380);
//add panels to tab
Calc.add("Standard", p1);
Calc.add("Scientific", p2);
//creat a text area for showing result
JTextArea display = new JTextArea();
//make possible to write in text area
display.setEditable(true);
//set font size and type of words in text area
display.setFont(new Font("Arial", Font.BOLD, 14));
//creat a scroll for text area
JScrollPane scrollPane = new JScrollPane(display);
//make scroll for both horizontal and vertical
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
//add scroll to frame
calcFrame.getContentPane().add(scrollPane);
//creating and adding buttons to each calculator
JButton openBot = new JButton("(");
p1.add(openBot);
JButton closeBot = new JButton(")");
p1.add(closeBot);
JButton remBot = new JButton("%");
p1.add(remBot);
JButton clearBot = new JButton("C");
p1.add(clearBot);
JButton seven = new JButton("7");
p1.add(seven);
JButton eight = new JButton("8");
p1.add(eight);
JButton nine = new JButton("9");
p1.add(nine);
JButton divBot = new JButton("/");
p1.add(divBot);
JButton four = new JButton("4");
p1.add(four);
JButton five = new JButton("5");
p1.add(five);
JButton six = new JButton("6");
p1.add(six);
JButton mulBot = new JButton("*");
p1.add(mulBot);
JButton one = new JButton("1");
p1.add(one);
JButton two = new JButton("2");
p1.add(two);
JButton three = new JButton("3");
p1.add(three);
JButton subBot = new JButton("-");
p1.add(subBot);
JButton zeroBtn = new JButton("0");
p1.add(zeroBtn);
JButton dot = new JButton(".");
p1.add(dot);
JButton doBtn = new JButton("=");
p1.add(doBtn);
JButton sumBtn = new JButton("+");
p1.add(sumBtn);
//adding and creating buttons for scientific calculator
//extra button of scientific calculator
JButton eOrEuler = new JButton("e-π");
JButton shift = new JButton("Shift");
JButton sinOrCos = new JButton("sin-cos");
JButton tanOrCot = new JButton("tan-cot");
JButton expOrLog = new JButton("exp-log");
p2.add(shift);
JButton openBot2 = new JButton("(");
p2.add(openBot2);
JButton closeBot2 = new JButton(")");
p2.add(closeBot2);
JButton remBot2 = new JButton("%");
p2.add(remBot2);
JButton clearBot2 = new JButton("C");
p2.add(clearBot2);
p2.add(eOrEuler);
JButton seven2 = new JButton("7");
p2.add(seven2);
JButton eight2 = new JButton("8");
p2.add(eight2);
JButton nine2 = new JButton("9");
p2.add(nine2);
JButton divBot2 = new JButton("/");
p2.add(divBot2);
p2.add(tanOrCot);
JButton four2 = new JButton("4");
p2.add(four2);
JButton five2 = new JButton("5");
p2.add(five2);
JButton six2 = new JButton("6");
p2.add(six2);
JButton mulBot2 = new JButton("*");
p2.add(mulBot2);
p2.add(expOrLog);
JButton one2 = new JButton("1");
p2.add(one2);
JButton two2 = new JButton("2");
p2.add(two2);
JButton three2 = new JButton("3");
p2.add(three2);
JButton subBot2 = new JButton("-");
p2.add(subBot2);
p2.add(sinOrCos);
JButton zeroBtn2 = new JButton("0");
p2.add(zeroBtn2);
JButton dot2 = new JButton(".");
p2.add(dot2);
JButton doBtn2 = new JButton("=");
p2.add(doBtn2);
JButton sumBtn2 = new JButton("+");
p2.add(sumBtn2);
//add tab to frame
calcFrame.add(Calc);
}
}
\ No newline at end of file
...@@ -7,13 +7,13 @@ import javax.swing.*; ...@@ -7,13 +7,13 @@ import javax.swing.*;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
//
for(UIManager.LookAndFeelInfo info :UIManager.getInstalledLookAndFeels()) // for(UIManager.LookAndFeelInfo info :UIManager.getInstalledLookAndFeels())
System.out.println(info.getClassName()); // System.out.println(info.getClassName());
//choosing UI //choosing UI
try { try {
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Motif".equals(info.getName())) { if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName()); UIManager.setLookAndFeel(info.getClassName());
break; break;
} }
...@@ -22,6 +22,7 @@ public class Main { ...@@ -22,6 +22,7 @@ public class Main {
// If Nimbus is not available, you can set the GUI to another look and feel. // If Nimbus is not available, you can set the GUI to another look and feel.
} }
//creat a new calculator //creat a new calculator
Calculator calculator = new Calculator(); View view =new View();
} }
} }
import java.security.PublicKey;
import java.util.ArrayList;
/**
* this class keep data
* @author Narges Salehi
*/
public class Model {
//this array list keep numbers
ArrayList<Double> numbers;
//this array list keep operations
ArrayList<Character> operations;
//result
double result;
//index of numbers
int indexOfNum;
//index of operations
int indexOfOpe;
//keep result as a String
String text ;
//keep true for first digit of each number
boolean firstTime;
//keep true for new numbers begin
boolean hasOperation;
//check if shift has pressed
int shiftfalg;
/**
* creat a new Model - set default values
*/
public Model(){
numbers=new ArrayList<Double>();
operations=new ArrayList<Character>();
result=0;
indexOfNum=0;
indexOfOpe=0;
text="";
firstTime=true;
hasOperation=false;
shiftfalg=0;
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment