SlideShare a Scribd company logo
help me Java project
I put problem and my own code in the link
my code is long link : https://codeshare.io/YohNo
Solution
import javax.swing.*;
import java.awt.Font;
import javax.swing.JOptionPane;
import java.text.DecimalFormat;
import java.util.Scanner;
public class Assignment21 {
/**
* @param args the command line arguments
*/
public static JFrame frame;
public static DecimalFormat fmt = new DecimalFormat ("0.00;(0.00)");
public static String message;
public static boolean firstTime = true;
public static boolean firstTime2 = true;
public static CheckingAccount CheckAcc;
public static Transaction newTrans;
public static void main(String[] args) {
// TODO code application logic here
frame = new JFrame ("Transaction Options");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
EOptionsPanel panel = new EOptionsPanel();
frame.getContentPane().add (panel);
frame.pack();
frame.setVisible(true);
}
public static int getTransCode()
{
String codeStr;
int code;
codeStr=JOptionPane.showInputDialog(" Here are the Transaction
Codes: 1)Checking 2)Depositing 0)Terminate");
code = Integer.parseInt(codeStr);
return code;
}
public static double getTransAmount(){
String tStr;
double tAmount;
tStr = JOptionPane.showInputDialog("Enter the trans amount: ");
tAmount = Double.parseDouble(tStr);
return tAmount;
}
public static double processCheck(double tAmount)
{
CheckAcc.setServiceCharge(0.15);
newTrans = new Transaction(CheckAcc.getTransCount(),3,0.15);
CheckAcc.addTrans(newTrans);
message += " Transaction : Check in Amount of $" + fmt.format(tAmount) +
" Current Balance : $ " + fmt.format(CheckAcc.getBalance()) +
" Service Charge : Check --- charge: $0.15";
if(CheckAcc.getBalance()<500 && firstTime2)
{
CheckAcc.setServiceCharge(5.00);
newTrans = new Transaction(CheckAcc.getTransCount(),3,5.00);
CheckAcc.addTrans(newTrans);
firstTime2=false;
message += " Service Charge : Balance under $500 -- Charge: $5.00";
}
if(CheckAcc.getBalance()<0)
{
CheckAcc.setServiceCharge(10.00);
newTrans = new Transaction(CheckAcc.getTransCount(),3,10.00);
CheckAcc.addTrans(newTrans);
message += " Service Charge : Overdfart Balance --- Charge: $10.00";
}
message += " Total ServiceCharge : $ " + fmt.format(CheckAcc.getServiceCharge());
JOptionPane.showMessageDialog(null, message);
return 0;
}
public static double processDeposit(double tAmount)
{
CheckAcc.setServiceCharge(0.10);
newTrans = new Transaction(CheckAcc.getTransCount(),3,0.10);
CheckAcc.addTrans(newTrans);
message += " Transaction : Deposit in Amount of $" + fmt.format(tAmount) +
" Current Balance : $ " + fmt.format(CheckAcc.getBalance()) +
" Service Charge : Check --- charge: $0.10"+
" Total ServiceCharge : $ " + fmt.format(CheckAcc.getServiceCharge());
JOptionPane.showMessageDialog(null, message);
return 0;
}
public static void inputTransactions()
{
// define local variables
String initialStr;
double initial, tAmount, check, deposit, amount=0;
int code, number=0, id=0;
// get initial balance from the user
if(firstTime)
{
initialStr = JOptionPane.showInputDialog ("Please enter the initial balance: ");
initial = Double.parseDouble (initialStr);
/*
instantiate CheckingAccount object
to keep track of account information
*/
CheckAcc = new CheckingAccount (initial);
firstTime=false;
}
newTrans = new Transaction (number, id, amount);
frame.setVisible(false);
//Loop continues transactions until trans code = 0
do
{
message = "";
code = getTransCode();
if (code != 0) //initially checks that trans code != 0
{
tAmount = getTransAmount();
CheckAcc.setBalance(tAmount, code);
//creating a new Transaction object
newTrans = new Transaction (CheckAcc.getTransCount(), code, tAmount);
CheckAcc.addTrans(newTrans);//inputs the new object in the array
if (CheckAcc.getBalance() < 50)
message = "WARNING: Balance below $50";
if (code == 1)
{
check = processCheck(tAmount);
}
if (code == 2)
{
deposit = processDeposit(tAmount);
}
}
}
while (code != 0);
// When loop ends show final balance to user.
message += "*****************" + " Transaction End"
+ " *****************" + " Current Balance: " + fmt.format(CheckAcc.getBalance())
+ " Total Service Charges: " + fmt.format(CheckAcc.getServiceCharge())
+ " Final Balance: " + fmt.format(CheckAcc.getFinal());
JOptionPane.showMessageDialog(null, message);
frame.setVisible(true);
}
public static void listTransactions()
{
JTextArea text = new JTextArea();
String message = "";
int num;
text.setOpaque(false);
text.setFont(new Font("Monospaced", Font.PLAIN, 14) );
text.setBorder(null);
message+="All Transactions  ";
message+="Number Type Amount($)  ";
for ( num=0; num < CheckAcc.getTransCount(); num++)
{
String word = "";
newTrans = CheckAcc.getTrans(num);
System.out.println(newTrans.getTransId());
//Case switch to convert transID to a trans type (string)
switch (newTrans.getTransId())
{
case 1: word = "Check ";
break;
case 2: word = "Deposit ";
break;
case 3: word = "Service Charge";
}
message += String.format("%3d %10s %10s  ",
newTrans.getTransNumber(), word, fmt.format(newTrans.getTransAmount()));
}
text.setText(message);
JOptionPane.showMessageDialog(null, text);
}
public static void listChecks()
{
JTextArea text = new JTextArea();
String message = "";
int num;
text.setOpaque(false);
text.setFont(new Font("Monospaced", Font.PLAIN, 14) );
text.setBorder(null);
message+="Checks Cashed  ";
message+="Number Amount($)  ";
for ( num=0; num < CheckAcc.getTransCount(); num++)
{
newTrans = CheckAcc.getTrans(num);
if (newTrans.getTransId() == 1)
{
message += String.format("%3d %10s  ",
newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount()));
}
}
text.setText(message);
JOptionPane.showMessageDialog(null, text);
}
public static void listDeposits()
{
JTextArea text = new JTextArea();
String message = "";
int num;
text.setOpaque(false);
text.setFont(new Font("Monospaced", Font.PLAIN, 14) );
text.setBorder(null);
message+="Deposits Made  ";
message+="Number Amount($)  ";
for ( num=0; num < CheckAcc.getTransCount(); num++)
{
newTrans = CheckAcc.getTrans(num);
if (newTrans.getTransId() == 2)
{
message += String.format("%3d %10s  ",
newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount()));
}
}
text.setText(message);
JOptionPane.showMessageDialog(null, text);
}
public static void listService_Charges()
{
JTextArea text = new JTextArea();
String message = "";
int num;
text.setOpaque(false);
text.setFont(new Font("Monospaced", Font.PLAIN, 14) );
text.setBorder(null);
message+="Service Charges  ";
message+="Number Amount($)  ";
for ( num=0; num < CheckAcc.getTransCount(); num++)
{
newTrans = CheckAcc.getTrans(num);
if (newTrans.getTransId() == 3)
{
message += String.format("%3d %10s  ",
newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount()));
}
}
text.setText(message);
JOptionPane.showMessageDialog(null, text);
}
}
//-----------------CheckingAccount.java-------------------------------
package assignment2.pkg1;
import java.util.ArrayList;
public class CheckingAccount
{
private ArrayList transList;// keeps a list of Transaction objects for the account
private int transCount; // the count of Transaction objects and used as the ID for each transaction
private double currentbalance;
private double totalServiceCharge;
private double finalbalance;
public CheckingAccount(double initial)
{
transList = new ArrayList();
currentbalance = initial;
totalServiceCharge = 0;
finalbalance = 0;
}
public double getBalance()
{
return currentbalance;
}
public void setBalance(double tAmount, int transCode)
{
if(transCode == 1)
currentbalance -= tAmount;
else //if(transCode == 2)
currentbalance += tAmount;
}
public double getServiceCharge()
{
return totalServiceCharge;
}
public void setServiceCharge(double currentServiceCharge)
{
totalServiceCharge += currentServiceCharge;
}
public double getFinal()
{
finalbalance = currentbalance - totalServiceCharge;
return finalbalance;
}
public void addTrans(Transaction newTrans)// adds a transaction object to the transList
{
transList.add(newTrans);
transCount ++;
}
public int getTransCount()//returns the current value of transCount;
{
return transCount;
}
public Transaction getTrans(int i)// returns the i-th Transaction object in the list
{
return transList.get(i);
}
}
//---------------------------------EOptionsPanel.java-------------------------------------------
package assignment2.pkg1;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import assignment2.pkg1.Assignment21;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Color;
public class EOptionsPanel extends JPanel
{
private JLabel prompt;
private JRadioButton one, two, three, four, five;
//-----------------------------------------------------------------
// Sets up a panel with a label and a set of radio buttons
// that present options to the user.
//-----------------------------------------------------------------
public EOptionsPanel()
{
prompt = new JLabel ("Choose your input option:");
prompt.setFont (new Font ("Courier New", Font.BOLD, 24));
one = new JRadioButton ("Enter A Transaction");
one.setBackground (Color.red);
two = new JRadioButton ("List All Transactions");
two.setBackground (Color.GREEN);
three = new JRadioButton ("List All Checks");
three.setBackground (Color.Blue);
four = new JRadioButton ("List All Deposits");
four.setBackground (Color.yellow);
five= new JRadioButton ("List All Service Charges");
five.setBackground (Color.magenta);
ButtonGroup group = new ButtonGroup();
group.add (one);
group.add (two);
group.add (three);
group.add (four);
group.add (five);
EOptionListener listener = new EOptionListener();
one.addActionListener (listener);
two.addActionListener (listener);
three.addActionListener (listener);
four.addActionListener (listener);
five.addActionListener (listener);
// add the components to the JPanel
add (prompt);
add (one);
add (two);
add (three);
add (four);
add (five);
setBackground (Color.green);
setPreferredSize (new Dimension(400, 140));
}
//*****************************************************************
// Represents the listener for the radio buttons
//*****************************************************************
private class EOptionListener implements ActionListener
{
//--------------------------------------------------------------
// Calls the method to process the option for which radio
// button was pressed.
//--------------------------------------------------------------
public void actionPerformed (ActionEvent event)
{
Object source = event.getSource();
if (source == one)
Assignment21.inputTransactions();
else
if (source == two)
Assignment21.listTransactions();
else
if (source == three)
Assignment21.listChecks();
if (source == four)//list deposits
Assignment21.listDeposits();
if (source == five)
Assignment21.listService_Charges();
}
}
}
//------------------------------Transaction.java-----------------------------------
package assignment2.pkg1;
public class Transaction {
private int transNumber;
private int transId;
private double tAmount;
public Transaction(int number, int id, double amount)
{
transNumber = number;
transId = id;
tAmount = amount;
}
public int getTransNumber()
{
return transNumber;
}
public int getTransId()
{
return transId;
}
public double getTransAmount()
{
return tAmount;
}
}

More Related Content

Similar to help me Java projectI put problem and my own code in the linkmy .pdf

My code is below How do I write this code without usin.pdf
My code is below How do I write this code without usin.pdfMy code is below How do I write this code without usin.pdf
My code is below How do I write this code without usin.pdf
adianantsolutions
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
amrit47
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical File
Fahad Shaikh
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
varadasuren
 
Spring Transaction
Spring TransactionSpring Transaction
Spring Transaction
Jannarong Wadthong
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
indiaartz
 
Program flowchart
Program flowchartProgram flowchart
Program flowchart
Sowri Rajan
 
csc 208
csc 208csc 208
csc 208
priska
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
sana shaikh
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
Tomek Kaczanowski
 
You are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdfYou are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdf
deepakangel
 
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
sudhirchourasia86
 
Jason parsing
Jason parsingJason parsing
Jason parsing
parallelminder
 
C programs
C programsC programs
C programs
Vikram Nandini
 

Similar to help me Java projectI put problem and my own code in the linkmy .pdf (20)

My code is below How do I write this code without usin.pdf
My code is below How do I write this code without usin.pdfMy code is below How do I write this code without usin.pdf
My code is below How do I write this code without usin.pdf
 
MaintainStaffTable
MaintainStaffTableMaintainStaffTable
MaintainStaffTable
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
java assignment
java assignmentjava assignment
java assignment
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical File
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
Spring Transaction
Spring TransactionSpring Transaction
Spring Transaction
 
Marcus Portfolio
Marcus  PortfolioMarcus  Portfolio
Marcus Portfolio
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
Program flowchart
Program flowchartProgram flowchart
Program flowchart
 
csc 208
csc 208csc 208
csc 208
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
You are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdfYou are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdf
 
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
 
Jason parsing
Jason parsingJason parsing
Jason parsing
 
C programs
C programsC programs
C programs
 

More from arihantmum

In 2012, the percent of American adults who owned cell phones and us.pdf
In 2012, the percent of American adults who owned cell phones and us.pdfIn 2012, the percent of American adults who owned cell phones and us.pdf
In 2012, the percent of American adults who owned cell phones and us.pdf
arihantmum
 
In a multiple regression model, the error term e is assumed tohave.pdf
In a multiple regression model, the error term e is assumed tohave.pdfIn a multiple regression model, the error term e is assumed tohave.pdf
In a multiple regression model, the error term e is assumed tohave.pdf
arihantmum
 
I need help with this one method in java. Here are the guidelines. O.pdf
I need help with this one method in java. Here are the guidelines. O.pdfI need help with this one method in java. Here are the guidelines. O.pdf
I need help with this one method in java. Here are the guidelines. O.pdf
arihantmum
 
Heading ibe the following picture. Main computer UART DTE Serial chan.pdf
Heading ibe the following picture. Main computer UART DTE Serial chan.pdfHeading ibe the following picture. Main computer UART DTE Serial chan.pdf
Heading ibe the following picture. Main computer UART DTE Serial chan.pdf
arihantmum
 
Explain how TWO (2) different structural features can be used to dis.pdf
Explain how TWO (2) different structural features can be used to dis.pdfExplain how TWO (2) different structural features can be used to dis.pdf
Explain how TWO (2) different structural features can be used to dis.pdf
arihantmum
 
Explain two (2) alternative ways in which plants can obtain nutrient.pdf
Explain two (2) alternative ways in which plants can obtain nutrient.pdfExplain two (2) alternative ways in which plants can obtain nutrient.pdf
Explain two (2) alternative ways in which plants can obtain nutrient.pdf
arihantmum
 
Couldnt find the right subject that it belongs to...There ar.pdf
Couldnt find the right subject that it belongs to...There ar.pdfCouldnt find the right subject that it belongs to...There ar.pdf
Couldnt find the right subject that it belongs to...There ar.pdf
arihantmum
 
Consider the following C code snippet C codevoid setArray(int.pdf
Consider the following C code snippet C codevoid setArray(int.pdfConsider the following C code snippet C codevoid setArray(int.pdf
Consider the following C code snippet C codevoid setArray(int.pdf
arihantmum
 
Describe a mechanism that the body uses to prevent a mutation from be.pdf
Describe a mechanism that the body uses to prevent a mutation from be.pdfDescribe a mechanism that the body uses to prevent a mutation from be.pdf
Describe a mechanism that the body uses to prevent a mutation from be.pdf
arihantmum
 
classify domian of life differencesSolutionClassify the domain.pdf
classify domian of life differencesSolutionClassify the domain.pdfclassify domian of life differencesSolutionClassify the domain.pdf
classify domian of life differencesSolutionClassify the domain.pdf
arihantmum
 
Compare and contrast the development of a WBS in traditional project.pdf
Compare and contrast the development of a WBS in traditional project.pdfCompare and contrast the development of a WBS in traditional project.pdf
Compare and contrast the development of a WBS in traditional project.pdf
arihantmum
 
B. You are an evolutionary biologist in a heated argument with a cre.pdf
B. You are an evolutionary biologist in a heated argument with a cre.pdfB. You are an evolutionary biologist in a heated argument with a cre.pdf
B. You are an evolutionary biologist in a heated argument with a cre.pdf
arihantmum
 
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdfAssume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
arihantmum
 
Amon the following, which has the lowest levels of dissolved iron.pdf
Amon the following, which has the lowest levels of dissolved iron.pdfAmon the following, which has the lowest levels of dissolved iron.pdf
Amon the following, which has the lowest levels of dissolved iron.pdf
arihantmum
 
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdfA box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
arihantmum
 
As late as 1992, the United States was running budget deficits of ne.pdf
As late as 1992, the United States was running budget deficits of ne.pdfAs late as 1992, the United States was running budget deficits of ne.pdf
As late as 1992, the United States was running budget deficits of ne.pdf
arihantmum
 
A bacteriophage population is introduced to a bacterial colony that .pdf
A bacteriophage population is introduced to a bacterial colony that .pdfA bacteriophage population is introduced to a bacterial colony that .pdf
A bacteriophage population is introduced to a bacterial colony that .pdf
arihantmum
 
Xavier and Yolanda both have classes that end at noon and they agree .pdf
Xavier and Yolanda both have classes that end at noon and they agree .pdfXavier and Yolanda both have classes that end at noon and they agree .pdf
Xavier and Yolanda both have classes that end at noon and they agree .pdf
arihantmum
 
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
arihantmum
 
1. An important contribution of Fiedlers research on the contingen.pdf
1. An important contribution of Fiedlers research on the contingen.pdf1. An important contribution of Fiedlers research on the contingen.pdf
1. An important contribution of Fiedlers research on the contingen.pdf
arihantmum
 

More from arihantmum (20)

In 2012, the percent of American adults who owned cell phones and us.pdf
In 2012, the percent of American adults who owned cell phones and us.pdfIn 2012, the percent of American adults who owned cell phones and us.pdf
In 2012, the percent of American adults who owned cell phones and us.pdf
 
In a multiple regression model, the error term e is assumed tohave.pdf
In a multiple regression model, the error term e is assumed tohave.pdfIn a multiple regression model, the error term e is assumed tohave.pdf
In a multiple regression model, the error term e is assumed tohave.pdf
 
I need help with this one method in java. Here are the guidelines. O.pdf
I need help with this one method in java. Here are the guidelines. O.pdfI need help with this one method in java. Here are the guidelines. O.pdf
I need help with this one method in java. Here are the guidelines. O.pdf
 
Heading ibe the following picture. Main computer UART DTE Serial chan.pdf
Heading ibe the following picture. Main computer UART DTE Serial chan.pdfHeading ibe the following picture. Main computer UART DTE Serial chan.pdf
Heading ibe the following picture. Main computer UART DTE Serial chan.pdf
 
Explain how TWO (2) different structural features can be used to dis.pdf
Explain how TWO (2) different structural features can be used to dis.pdfExplain how TWO (2) different structural features can be used to dis.pdf
Explain how TWO (2) different structural features can be used to dis.pdf
 
Explain two (2) alternative ways in which plants can obtain nutrient.pdf
Explain two (2) alternative ways in which plants can obtain nutrient.pdfExplain two (2) alternative ways in which plants can obtain nutrient.pdf
Explain two (2) alternative ways in which plants can obtain nutrient.pdf
 
Couldnt find the right subject that it belongs to...There ar.pdf
Couldnt find the right subject that it belongs to...There ar.pdfCouldnt find the right subject that it belongs to...There ar.pdf
Couldnt find the right subject that it belongs to...There ar.pdf
 
Consider the following C code snippet C codevoid setArray(int.pdf
Consider the following C code snippet C codevoid setArray(int.pdfConsider the following C code snippet C codevoid setArray(int.pdf
Consider the following C code snippet C codevoid setArray(int.pdf
 
Describe a mechanism that the body uses to prevent a mutation from be.pdf
Describe a mechanism that the body uses to prevent a mutation from be.pdfDescribe a mechanism that the body uses to prevent a mutation from be.pdf
Describe a mechanism that the body uses to prevent a mutation from be.pdf
 
classify domian of life differencesSolutionClassify the domain.pdf
classify domian of life differencesSolutionClassify the domain.pdfclassify domian of life differencesSolutionClassify the domain.pdf
classify domian of life differencesSolutionClassify the domain.pdf
 
Compare and contrast the development of a WBS in traditional project.pdf
Compare and contrast the development of a WBS in traditional project.pdfCompare and contrast the development of a WBS in traditional project.pdf
Compare and contrast the development of a WBS in traditional project.pdf
 
B. You are an evolutionary biologist in a heated argument with a cre.pdf
B. You are an evolutionary biologist in a heated argument with a cre.pdfB. You are an evolutionary biologist in a heated argument with a cre.pdf
B. You are an evolutionary biologist in a heated argument with a cre.pdf
 
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdfAssume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
Assume Hashtable is a simple array of size 8, with indices 0..7. Num.pdf
 
Amon the following, which has the lowest levels of dissolved iron.pdf
Amon the following, which has the lowest levels of dissolved iron.pdfAmon the following, which has the lowest levels of dissolved iron.pdf
Amon the following, which has the lowest levels of dissolved iron.pdf
 
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdfA box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
A box contains 10 red balls and 40 black balls. Two balls are drawn .pdf
 
As late as 1992, the United States was running budget deficits of ne.pdf
As late as 1992, the United States was running budget deficits of ne.pdfAs late as 1992, the United States was running budget deficits of ne.pdf
As late as 1992, the United States was running budget deficits of ne.pdf
 
A bacteriophage population is introduced to a bacterial colony that .pdf
A bacteriophage population is introduced to a bacterial colony that .pdfA bacteriophage population is introduced to a bacterial colony that .pdf
A bacteriophage population is introduced to a bacterial colony that .pdf
 
Xavier and Yolanda both have classes that end at noon and they agree .pdf
Xavier and Yolanda both have classes that end at noon and they agree .pdfXavier and Yolanda both have classes that end at noon and they agree .pdf
Xavier and Yolanda both have classes that end at noon and they agree .pdf
 
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
1. Low platelet count is a recessively inherited trait. Reevaluation.pdf
 
1. An important contribution of Fiedlers research on the contingen.pdf
1. An important contribution of Fiedlers research on the contingen.pdf1. An important contribution of Fiedlers research on the contingen.pdf
1. An important contribution of Fiedlers research on the contingen.pdf
 

Recently uploaded

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 

Recently uploaded (20)

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 

help me Java projectI put problem and my own code in the linkmy .pdf

  • 1. help me Java project I put problem and my own code in the link my code is long link : https://codeshare.io/YohNo Solution import javax.swing.*; import java.awt.Font; import javax.swing.JOptionPane; import java.text.DecimalFormat; import java.util.Scanner; public class Assignment21 { /** * @param args the command line arguments */ public static JFrame frame; public static DecimalFormat fmt = new DecimalFormat ("0.00;(0.00)"); public static String message; public static boolean firstTime = true; public static boolean firstTime2 = true; public static CheckingAccount CheckAcc; public static Transaction newTrans; public static void main(String[] args) { // TODO code application logic here frame = new JFrame ("Transaction Options"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); EOptionsPanel panel = new EOptionsPanel(); frame.getContentPane().add (panel); frame.pack(); frame.setVisible(true); } public static int getTransCode() { String codeStr; int code;
  • 2. codeStr=JOptionPane.showInputDialog(" Here are the Transaction Codes: 1)Checking 2)Depositing 0)Terminate"); code = Integer.parseInt(codeStr); return code; } public static double getTransAmount(){ String tStr; double tAmount; tStr = JOptionPane.showInputDialog("Enter the trans amount: "); tAmount = Double.parseDouble(tStr); return tAmount; } public static double processCheck(double tAmount) { CheckAcc.setServiceCharge(0.15); newTrans = new Transaction(CheckAcc.getTransCount(),3,0.15); CheckAcc.addTrans(newTrans); message += " Transaction : Check in Amount of $" + fmt.format(tAmount) + " Current Balance : $ " + fmt.format(CheckAcc.getBalance()) + " Service Charge : Check --- charge: $0.15"; if(CheckAcc.getBalance()<500 && firstTime2) { CheckAcc.setServiceCharge(5.00); newTrans = new Transaction(CheckAcc.getTransCount(),3,5.00); CheckAcc.addTrans(newTrans); firstTime2=false; message += " Service Charge : Balance under $500 -- Charge: $5.00"; } if(CheckAcc.getBalance()<0) { CheckAcc.setServiceCharge(10.00); newTrans = new Transaction(CheckAcc.getTransCount(),3,10.00); CheckAcc.addTrans(newTrans);
  • 3. message += " Service Charge : Overdfart Balance --- Charge: $10.00"; } message += " Total ServiceCharge : $ " + fmt.format(CheckAcc.getServiceCharge()); JOptionPane.showMessageDialog(null, message); return 0; } public static double processDeposit(double tAmount) { CheckAcc.setServiceCharge(0.10); newTrans = new Transaction(CheckAcc.getTransCount(),3,0.10); CheckAcc.addTrans(newTrans); message += " Transaction : Deposit in Amount of $" + fmt.format(tAmount) + " Current Balance : $ " + fmt.format(CheckAcc.getBalance()) + " Service Charge : Check --- charge: $0.10"+ " Total ServiceCharge : $ " + fmt.format(CheckAcc.getServiceCharge()); JOptionPane.showMessageDialog(null, message); return 0; } public static void inputTransactions() { // define local variables String initialStr; double initial, tAmount, check, deposit, amount=0; int code, number=0, id=0; // get initial balance from the user if(firstTime) { initialStr = JOptionPane.showInputDialog ("Please enter the initial balance: "); initial = Double.parseDouble (initialStr); /* instantiate CheckingAccount object to keep track of account information
  • 4. */ CheckAcc = new CheckingAccount (initial); firstTime=false; } newTrans = new Transaction (number, id, amount); frame.setVisible(false); //Loop continues transactions until trans code = 0 do { message = ""; code = getTransCode(); if (code != 0) //initially checks that trans code != 0 { tAmount = getTransAmount(); CheckAcc.setBalance(tAmount, code); //creating a new Transaction object newTrans = new Transaction (CheckAcc.getTransCount(), code, tAmount); CheckAcc.addTrans(newTrans);//inputs the new object in the array if (CheckAcc.getBalance() < 50) message = "WARNING: Balance below $50"; if (code == 1) { check = processCheck(tAmount); } if (code == 2) { deposit = processDeposit(tAmount); } } }
  • 5. while (code != 0); // When loop ends show final balance to user. message += "*****************" + " Transaction End" + " *****************" + " Current Balance: " + fmt.format(CheckAcc.getBalance()) + " Total Service Charges: " + fmt.format(CheckAcc.getServiceCharge()) + " Final Balance: " + fmt.format(CheckAcc.getFinal()); JOptionPane.showMessageDialog(null, message); frame.setVisible(true); } public static void listTransactions() { JTextArea text = new JTextArea(); String message = ""; int num; text.setOpaque(false); text.setFont(new Font("Monospaced", Font.PLAIN, 14) ); text.setBorder(null); message+="All Transactions "; message+="Number Type Amount($) "; for ( num=0; num < CheckAcc.getTransCount(); num++) { String word = ""; newTrans = CheckAcc.getTrans(num); System.out.println(newTrans.getTransId()); //Case switch to convert transID to a trans type (string) switch (newTrans.getTransId()) { case 1: word = "Check "; break; case 2: word = "Deposit "; break; case 3: word = "Service Charge"; }
  • 6. message += String.format("%3d %10s %10s ", newTrans.getTransNumber(), word, fmt.format(newTrans.getTransAmount())); } text.setText(message); JOptionPane.showMessageDialog(null, text); } public static void listChecks() { JTextArea text = new JTextArea(); String message = ""; int num; text.setOpaque(false); text.setFont(new Font("Monospaced", Font.PLAIN, 14) ); text.setBorder(null); message+="Checks Cashed "; message+="Number Amount($) "; for ( num=0; num < CheckAcc.getTransCount(); num++) { newTrans = CheckAcc.getTrans(num); if (newTrans.getTransId() == 1) { message += String.format("%3d %10s ", newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount())); } } text.setText(message); JOptionPane.showMessageDialog(null, text); } public static void listDeposits() { JTextArea text = new JTextArea(); String message = ""; int num; text.setOpaque(false);
  • 7. text.setFont(new Font("Monospaced", Font.PLAIN, 14) ); text.setBorder(null); message+="Deposits Made "; message+="Number Amount($) "; for ( num=0; num < CheckAcc.getTransCount(); num++) { newTrans = CheckAcc.getTrans(num); if (newTrans.getTransId() == 2) { message += String.format("%3d %10s ", newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount())); } } text.setText(message); JOptionPane.showMessageDialog(null, text); } public static void listService_Charges() { JTextArea text = new JTextArea(); String message = ""; int num; text.setOpaque(false); text.setFont(new Font("Monospaced", Font.PLAIN, 14) ); text.setBorder(null); message+="Service Charges "; message+="Number Amount($) "; for ( num=0; num < CheckAcc.getTransCount(); num++) { newTrans = CheckAcc.getTrans(num); if (newTrans.getTransId() == 3) { message += String.format("%3d %10s ", newTrans.getTransNumber(), fmt.format(newTrans.getTransAmount())); } } text.setText(message);
  • 8. JOptionPane.showMessageDialog(null, text); } } //-----------------CheckingAccount.java------------------------------- package assignment2.pkg1; import java.util.ArrayList; public class CheckingAccount { private ArrayList transList;// keeps a list of Transaction objects for the account private int transCount; // the count of Transaction objects and used as the ID for each transaction private double currentbalance; private double totalServiceCharge; private double finalbalance; public CheckingAccount(double initial) { transList = new ArrayList(); currentbalance = initial; totalServiceCharge = 0; finalbalance = 0; } public double getBalance() { return currentbalance; } public void setBalance(double tAmount, int transCode) { if(transCode == 1) currentbalance -= tAmount; else //if(transCode == 2) currentbalance += tAmount; } public double getServiceCharge()
  • 9. { return totalServiceCharge; } public void setServiceCharge(double currentServiceCharge) { totalServiceCharge += currentServiceCharge; } public double getFinal() { finalbalance = currentbalance - totalServiceCharge; return finalbalance; } public void addTrans(Transaction newTrans)// adds a transaction object to the transList { transList.add(newTrans); transCount ++; } public int getTransCount()//returns the current value of transCount; { return transCount; } public Transaction getTrans(int i)// returns the i-th Transaction object in the list { return transList.get(i); } } //---------------------------------EOptionsPanel.java------------------------------------------- package assignment2.pkg1; import javax.swing.*; import java.awt.*;
  • 10. import java.awt.event.*; import assignment2.pkg1.Assignment21; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.Color; public class EOptionsPanel extends JPanel { private JLabel prompt; private JRadioButton one, two, three, four, five; //----------------------------------------------------------------- // Sets up a panel with a label and a set of radio buttons // that present options to the user. //----------------------------------------------------------------- public EOptionsPanel() { prompt = new JLabel ("Choose your input option:"); prompt.setFont (new Font ("Courier New", Font.BOLD, 24)); one = new JRadioButton ("Enter A Transaction"); one.setBackground (Color.red); two = new JRadioButton ("List All Transactions"); two.setBackground (Color.GREEN); three = new JRadioButton ("List All Checks"); three.setBackground (Color.Blue); four = new JRadioButton ("List All Deposits"); four.setBackground (Color.yellow); five= new JRadioButton ("List All Service Charges"); five.setBackground (Color.magenta); ButtonGroup group = new ButtonGroup(); group.add (one); group.add (two);
  • 11. group.add (three); group.add (four); group.add (five); EOptionListener listener = new EOptionListener(); one.addActionListener (listener); two.addActionListener (listener); three.addActionListener (listener); four.addActionListener (listener); five.addActionListener (listener); // add the components to the JPanel add (prompt); add (one); add (two); add (three); add (four); add (five); setBackground (Color.green); setPreferredSize (new Dimension(400, 140)); } //***************************************************************** // Represents the listener for the radio buttons //***************************************************************** private class EOptionListener implements ActionListener { //-------------------------------------------------------------- // Calls the method to process the option for which radio // button was pressed. //-------------------------------------------------------------- public void actionPerformed (ActionEvent event) { Object source = event.getSource(); if (source == one)
  • 12. Assignment21.inputTransactions(); else if (source == two) Assignment21.listTransactions(); else if (source == three) Assignment21.listChecks(); if (source == four)//list deposits Assignment21.listDeposits(); if (source == five) Assignment21.listService_Charges(); } } } //------------------------------Transaction.java----------------------------------- package assignment2.pkg1; public class Transaction { private int transNumber; private int transId; private double tAmount; public Transaction(int number, int id, double amount) { transNumber = number; transId = id; tAmount = amount; } public int getTransNumber() { return transNumber; }
  • 13. public int getTransId() { return transId; } public double getTransAmount() { return tAmount; } }