Aux outputs and Busses with LE7
Hi there,
I just bought ez drummer and finally have it working on multiple aux's using a template from ez drummer.
Problem: when I send an audio track (guitar) to, say, bus 1, and solo that track, the overheads from ezdrummer come through as well. All inputs/outputs appear to be correct and I am not sending any of the aux to the busses.
What am I missing? is this a limitation of express?
Thanks,
Vince
1) when i move the fader on say aux 1 to change the level of my cello, the aux 2 fader jumps as if its linked to aux 1. why does this happen?
It shouldn't. Have you cabled them together, or something?
2) do i mute the instrument track which holds Miroslav as it is now routing the sound to the aux inputs now? or do i leave it on?
The master audio instrument channel always holds the first output pair. If you've routed all your parts to extra outputs, then nothing will come up on this channel anyway, so it makes no different if you mute it or leave it.
If you have some parts coming out of the first outputs of the instrument, you'll need to elave the channel unmuted in order to hear them.
3) if i then choose to send the aux channels to a bus for reverb do i then mute the aux channels?
It depends what you want. In general, no, use the sends on each aux to send to a different bus with the reverb on, and make sure the reverb is set to 100% wet.
Similar Messages
-
USB (Mega stick), sound output and PS2 problems
==USB problem==
The MSI MEGA STICK do not work with the MSI K7N2 Delta ILSR.
When you plug it, its recognized, you can write on the MEGA STICK, delete files but cannot READ from MEGA STICK. It freezes while display "reading". I have tried on lots of PCs. Only my MSI motherboard do not work properly. The same problem with my 2 MEGA STICK. And i had tried Windows XP and Linux. Same problem. Others USB devices works fine. Even card readers...
==PS2==
My optical wireless mouse do not works properly. When i turns on the computer, it works ok. If i restart, do not work. Restart again, works. And go on... Only this mouse. Others MB works fine.
==Sound Output==
And also with my sound output. The eletrical one (coaxial).
It do not work with my 5.1 home system. It works fine with my old SB Live. It gets worse when i use my tv output from my Radeon 9100. It only works SOMETIMES when the tv output is not plugged in.
Thanks to all that could help me.Mega stick.
have you updated the firmware ?
No. It Freezes before being able to update. Also the update do not tell about solving this problem
"Firmware version: 2.05
Update items
1. Improve delete MP3 and voice files function.
2. Fix device will restart while forward/backward Voice file."
you do know that windows xp does not come with usb2 drivers.
sp1 does and you have to install them yourself.
go to device manager and delete all usb entries and reboot and windows will install the usb2 drivers next time you boot.
if you get a slipstreamed version of xp you dont need to do this as it installed usb2 drivers rightaway.
slipstream means a xp disc with sp1 on it.
My XP cd is already SP1. Also tried on BIOS to use only USB 1.1V
PS2.
tried to use the other ps2 contact ?
No. Could i use the keyboard PS2 to plug the mouse?
SOUND.
this is not my area but it could be a good idea to post what the equipment is.
have you tried the latest drivers from http://www.nvidia.com ?[/quote]
Its a brazilian brend. You wont know. CCE. Its works fine with DVDs, my old SB Live! and others. Only with my K7N2 do not work properly. Its an AC3 decoder. The problem gets worse when i use the Radeon 9100 tv out.
Look like the problem on this thread.
https://forum-en.msi.com/index.php?threadid=29572&sid=&hilightuser=26427
This is my old thread. Never solved. :-(
https://forum-en.msi.com/index.php?sid=&postid=319195#post319195
When i updated the BIOS, it got even worse. Not even with the tv output unplugged it never worked anymore...
Its very disapointed to buy an expensive MB and realized that it do not work properly...
Thanks yo your help. -
I have an older Macbook pro with a dvi output and I want to watch movies on my tv. I have a dvi to hdmi cable but the only image I get on my TV is my desktop background. None of my movie players with appear on the TV screen. What am I doing wrong?
Hi Maryan,
Open System Preferences > Displays > select the window for you external monitor > click on the Arrangement tab and check the box next to Mirror Displays. It may be slightly different in Lion, but the idea is the same. -
Premiere Pro CS6 and CC with bad quality and incorrect colors in output video
Hi everyone!
I'm frustrated with my results after exporting a video with Adobe Premiere Pro (both CS6 and CC).
The color of the video output is slightly different to the original file (i've checked if it was a problem with my video player, but no, i've tested the video with WMP and others with no success).
Also the video quality is a little bad compared to the original file (i even tried to use frame blending once).
Notice that i'm not using any effects or anything alike, and i'm a begginer in video editing.
These are the parameters from the original video (made by Media Info software):
Format
: MPEG-4
Format profile
: Base Media
Codec ID
: isom
File size
: 1.70 GiB
Duration
: 1h 35mn
Overall bit rate mode
: Variable
Overall bit rate
: 2 540 Kbps
Encoded date
: UTC 2012-12-06 21:47:27
Tagged date
: UTC 2012-12-06 21:47:27
Video
ID
: 1
Format
: AVC
Format/Info
: Advanced Video Codec
Format profile
: [email protected]
Format settings, CABAC
: Yes
Format settings, ReFrames
: 4 frames
Codec ID
: avc1
Codec ID/Info
: Advanced Video Coding
Duration
: 1h 35mn
Bit rate
: 2 246 Kbps
Maximum bit rate
: 33.7 Mbps
Width
: 1 920 pixels
Height
: 816 pixels
Display aspect ratio
: 2.35:1
Frame rate mode
: Constant
Frame rate
: 23.976 fps
Color space
: YUV
Chroma subsampling
: 4:2:0
Bit depth
: 8 bits
Scan type
: Progressive
Bits/(Pixel*Frame)
: 0.060
Stream size
: 1.50 GiB (88%)
Title
: Video
Writing library
: x264 core 128 r2216 198a7ea
Encoding settings
: cabac=1 / ref=3 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2246 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=25000 / nal_hrd=none / ip_ratio=1.40 / aq=1:0.60
Encoded date
: UTC 2012-12-06 21:47:27
Tagged date
: UTC 2012-12-06 21:48:02
I'm exporting the video using almost the same parameters from the original file.
Here's a screen shot of my settings in Premiere:
As you can see in the printscreen, the settings only differ from the original file parameters in the bit rate (which i raised a little),
the TV standard (which i have no ideia what it changes), the level of H.264 (which i raised from 4.0 to 4.1, 5.0 and 5.1), and the bit rate encoding (which i've tried using CBR, VBR 1, and VBR 2).
Just for my curiosity...why these numbers in orange are so extensive? I mean, the original video is only 01:35:30:06 in final output (which is correct).
Notice that i do not use key frame distance (as i don't know what it does).
If i'm doing something wrong, please tell me.Well if i do that, the video will raise up GBs larger (and that is really bad).
Why is it really bad?
Its a fact of digital life. High datarate = quality.
example ...even the Youtube preset is in the 8mpbs area.
...and you are exporting 1 hr 35mins of media. -
I had 3 versions of FF and had to redo the HD and now no version will install says "Can't open output file" i have winddows 7 64 bit 8 GB memory and 1T HD but i have it on my other desktop and laptop with less memory and HD space and works fine laptop has windows 7 64 bit and other desktop hook to my 32" tv has win 7 32-bit i lso did clean removal of all versions of FF and did new DLs with screen shots of it DLing, complete of DL and after i got the error again.
i am posting this as a reply due to it would not allow me to attach screen shots except for this way
-
How create and work with Z output to meet the client requirment?
hi gurus,
I am SD functional consultant and need ur help
Please explain me how create and work with Z output .
How we arrange and change the fields in header and footer
where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
pls forward functional or Tech spec of Z output
points will be rewarded
thanx & regards
shabnumHi shabnum ,
I hope you can do it.
Goto SE71, enter form name--> click change
1) click in page window command button, Identify the header and footer window
2) single click on Header window and click change button(pencil symbol)
3) identify the fields and change order of the fields
I hope this will help to solve your issue
Regards,
SaiRam -
Storing PDF output in Opentext and associating with BP
Hi - We have installed Opentext doculink and performed all the BASIS configrations succesffully. I would greatly appreciate any advice on how to proceed with the following:
* When a PDF is generated using output determination (emailed to a BP) we want to store the PDF in Opentext and associated it to the BP
* Want to be able to retrieve the PDF from the BP.
Any advice greatly appreciated and rewarded with points!
Thanks!
ThomasHi Thomas,
have a look of my doc : (store printed doc) HTTP Content Server & GOS
(http content server is another solution, but how to use the content repository is the same)
Fred -
How create and work with Z output to meet user req
hi gurus,
I am SD functional consultant and need ur help
Please explain me how create and work with Z output .
How we arrange and change the fields in header and footer
where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
pls forward functional or Tech spec of Z output
points will be rewarded
thanx & regards
shabnumHi
From SPRO do the all steps.
Goto SD-> BASIC functions->Output control->Output determination->Output determination by condition technique->Maintain Output determination for sales documents
Here define all like access sequences, Output types, condition tables and assign them to Program and Forms.
From SE71 copy the script to a Zscript and to modify it to suit your requirements and the same Zscript has to be assigned to Output type, Program in NACE transaction.
Reward points if useful
Regards
Anji -
Sqvi join of Mara and Marc with erroneous output
hello all
I have made a join between Mara and Marc in a SQVI query.
as input i select material according to material type, material group and plants.
output i want the material, the group and the maintenance view of material for each plant.
not all the plants have the same maintenance view but the query returns the material for each plant with wrong maintenance view!
what can it be?i am trying to achieve the following:
material 12345 is in plants A, B, C
plant A has maintenance status KBVE
plant B has maintenance status BVE
plant C has maintenance status KVB
when I run the view, with the tables MARA and MARC joined by the material number, i requested the material filtering by material group, material type and maintenance view E.
i want the system to return material 12345 for plant A and B with the respective statuses and exclude C because it does not have the status E.
instead it returns material 12345 with plants A, B, C and all with maintenance status KBVE
is it clearer now?
also, what is the difference between mainenace status in MARA and in MARC? -
I have a turntable with a USB output and SOUNDSTUDIO3 software. I cannot"find" any audio to record. Can someone help "Denny-Dumb-Butt" see what he is doing wrong?? THANKS!!!
Did you also check if your USB device shows up in System Preferences > Sound?
I have an iMic USB "dongle" and need to select it if I want to record from an external source into Sound Studio 3. You need to check both the Input and Output. -
Channels and busses randomly re-routed in Logic 9?
Is this happening to any one but me? It's kind of difficult to artculate but here goes. Scenario: I have several Logic sessions (projects started a while back) that all have similar random issues. The projects were started as new blank or from a template. They've been updated, saved, re-opened and re-saved and re-opened dozens of times. Over time, I've added new tracks, Aux sends and returns (aux channels w busses assigned). There are plug-ins on all the tracks, some Logics some Waves or other vendors. I've edited and comped - all the types of normal updates. The tracks contain audio regions, loops, MIDI instruments, stuff like Superior Drummer or EX synths. I have backups and versions of all these versions. Some were started with a MOTU travelor, some with an MR816, and I've added a UA 4-710d recently. This behavior spans all of it.
I'm now mixing. Every time I re-open one of these sessions (projects), I find more bizarre, seemingly random changes. There's a stereo audio drum track- it contains a mixture of audio regions, identical copies; others are unique regions (a track of drum loop patterns with a few fills, for example). When I last saved this session the track was fine, stereo, all regions played back. The next time I opend the file the "fills" regions were silent. I opened them in the Finder and they soun fine. OR the track is no longer Stereo and the sound is only on one side. Or the Inspector to the left of the Arrange Window is blank, and right clicking on the channel reveals that the track (let's say "track 2 drums") is "Controlled by track 19," which is a MIDI track. My solution is to create a new track and re-copy the slient regions from the finder. Now I have two drum tracks.
I set up three aux busses, one for Delay, one as an ambience compressor, and one with Space Desgner. I re-open a session and the Aux returns no longer show the signal coming from a Buss, but now from an input. I reassign them and I'm ok. The plug-ins still same as before.
But this rerouting is very confusing. Nothing changed in my hardware from the last to the next session. For me, even if hardware is changed the internal routing should not. I can see about inputs but not an Aux or Stereo mix bus. What happens when I take my session to a studio to mix? They have a totally unique system and configuration. I was advised to turn off and disconnect everything external in order to get to a vanilla configuartion. So did so and used Apples internal line in (even though I'm no longer recording) and The headphone out. (Mac Pro 8-core). Same thing. The tracks are still moved. I even see tracks that are nto stereo nor mono. There a tracks with no stereo assignment at all (below the strip meter, which is single nto separated), even a track showing two circles NOT overlapping, one is dark and the other open / white. I right-click and see the options Stereo, Mono, Surround. sound comes out one side. Bizarre!
My only way to deal with this - since I've got a month invested is to create a new track for each of these- and it's working so far. But I can't imagine haiving to keep doing this. I trashed my Logic Preferences. I asked about a Logic cache - none such exists. If I was working in Cubase, for instance, I'd see a VST Connections Window. And one for Devices. I could completely reassign everything. Is there no such control in Logic? Is this a Logic issue or Core Audio?
I have a radio spot music bed that was starte in Logic a few versions back. I've noticed similar behavior- and solutions - a few times. A guitar track goes silent. I copy it to a new track and it's ok, and then a MIDI drum track goes south. I thought this was because it was started on a differnt Mac. But then I think - so what? These projects should be futre compatible- even if it takes some re-sassignments.
Can't figure out why this happens or how to fix it.
Anyone have any thoughts or ideas - or similar behavior?Last things first... Sorry, no, I can't read crash reports. I'm better at reading Japanese, honestly. However, I've encountered the same error before:
EXCBADACCESS (SIGBUS)
...and if you do a google search you'll see that you're not alone, and, that it's not limited to working in Logic. Of the first hits on google someone said that it's a sign of bad RAM, but there were many other links to investigate so I would take that with a grain of salt for now. Maybe do a search for that yourself and see if anything posted on the web hits home for you.
EXS24 settings -- I just wanted to see if VM was on or off.
Interesting that it doesn't always happen. OK, are there particular libraries (3rd party, Logic factory stuff, etc.) that seem to perpetrate the crashes?
In the song(s) you're experiencing this in, are they already very sample-intensive, lots of sampler instruments loaded up? The reason I ask is that Logic has been known to go "huh?" and quit unexpectedly if you attempt to load up more samples than can fit into Logic's RAM footprint.
Another test... does this happen in a brand new, empty song (such as the Explore/Empty template)?
There are more things you can do to try and narrow down the problem, but rather than overwhelm you with stuff I'll stop here. Post back with your answers/results and we can take it from there. -
Airport Express Speaker output very quiet with 60-cycle hum
I've previously hooked up my Airport Express to my stereo system via AirTunes, and it worked fine. But I just moved and set up my home network with my Airport Express connected to the stereo with the mini-stereo adapter. But now, when I play music over AirTunes, I can hear the music very faintly, but it's about the same volume as a 60-cycle electrical interference hum, and definitely not listenable. So I know the music is streaming and the AirPort is receiving, but I'm wondering if it's an electrical problem with the AirPort or output jack, or is there some software or hardware fit I can do myself. I've plugged in & out the cord, it works with an iPod, it's connected to a non-Phono jack of the stereo (AUX port), and I've reset the AirPort Express unit. Any other suggestions? Thanks in advance.
Hello AOSmith. Welcome to the Apple Discussions!
To rule out your stereo or audio cable, try substituting a pair of stereo headphones plugged directly into the AX's audio port. Do you still hear the hum? If so, then the problem is either with the AX itself or the power source is not properly shielded. Try connecting the AX to a known good power strip; one that has surge protection and/or noise cancelling capability would be ideal, and then, plug this into the outlet that you had the AXn connected to. Did this help? If not, then unfortunately, the problem may be with either the AX's audio and/or power circuit. -
Need help to draw a graph from the output I get with my program please
Hi all,
I please need help with this program, I need to display the amount of money over the years (which the user has to enter via the textfields supplied)
on a graph, I'm not sure what to do further with my program, but I have created a test with a System.out.println() method just to see if I get the correct output and it looks fine.
My question is, how do I get the input that was entered by the user (the initial deposit amount as well as the number of years) and using these to draw up the graph? (I used a button for the user to click after he/she has entered both the deposit and year values to draw the graph but I don't know how to get this to work?)
Please help me.
The output that I got looked liked this: (just for a test!) - basically this kind of output must be shown on the graph...
The initial deposit made was: 200.0
After year: 1 Amount is: 210.00
After year: 2 Amount is: 220.50
After year: 3 Amount is: 231.53
After year: 4 Amount is: 243.10
After year: 5 Amount is: 255.26
After year: 6 Amount is: 268.02
After year: 7 Amount is: 281.42
After year: 8 Amount is: 295.49
After year: 9 Amount is: 310.27
After year: 10 Amount is: 325.78
After year: 11 Amount is: 342.07
After year: 12 Amount is: 359.17
After year: 13 Amount is: 377.13
After year: 14 Amount is: 395.99
After year: 15 Amount is: 415.79
After year: 16 Amount is: 436.57
After year: 17 Amount is: 458.40And here is my code that Iv'e done so far:
import javax.swing.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.Math;
import java.text.DecimalFormat;
public class CompoundInterestProgram extends JFrame implements ActionListener {
JLabel amountLabel = new JLabel("Please enter the initial deposit amount:");
JTextField amountText = new JTextField(5);
JLabel yearsLabel = new JLabel("Please enter the numbers of years:");
JTextField yearstext = new JTextField(5);
JButton drawButton = new JButton("Draw Graph");
public CompoundInterestProgram() {
super("Compound Interest Program");
setSize(500, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
amountText.addActionListener(this);
yearstext.addActionListener(this);
JPanel panel = new JPanel();
panel.setBackground(Color.white);
panel.add(amountLabel);
amountLabel.setToolTipText("Range of deposit must be 20 - 200!");
panel.add(amountText);
panel.add(yearsLabel);
yearsLabel.setToolTipText("Range of years must be 1 - 25!");
panel.add(yearstext);
panel.add(drawButton);
add(panel);
setVisible(true);
public static void main(String[] args) {
DecimalFormat dec2 = new DecimalFormat( "0.00" );
CompoundInterestProgram cip1 = new CompoundInterestProgram();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new GraphPanel());
f.setSize(500, 500);
f.setLocation(200,200);
f.setVisible(true);
Account a = new Account(200);
System.out.println("The initial deposit made was: " + a.getBalance() + "\n");
for (int year = 1; year <= 17; year++) {
System.out.println("After year: " + year + " \t" + "Amount is: " + dec2.format(a.getBalance() + a.calcInterest(year)));
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
class Account {
double balance = 0;
double interest = 0.05;
public Account() {
balance = 0;
interest = 0.05;
public Account(int deposit) {
balance = deposit;
interest = 0.05;
public double calcInterest(int year) {
return balance * Math.pow((1 + interest), year) - balance;
public double getBalance() {
return balance;
class GraphPanel extends JPanel {
public GraphPanel() {
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(Color.red);
}Your help would be much appreciated.
Thanks in advance.watertownjordan wrote:
http://www.jgraph.com/jgraph.html
The above is also good.Sorry but you need to look a bit more closely at URLs that you cite. What the OP wants is a chart (as in X against Y) not a graph (as in links and nodes) . 'jgraph' deals with links and nodes.
The best free charting library that I know of is JFreeChart from www.jfree.org. -
Checking Account and help with code ?
Hi all..my computer hung up on me, so I'm not sure if my last post went through. First of all thank you all for helping me out the other day with my question on the Bank Account. It continues :)
I'm trying to work on each class one by one..when I test my Checking Account, it isn't printing out the correct balance. The string method to print this is coming from the Withdrawal class...so I know it has to be somewhere in there but I can't seem to figure out why it isn't totalling the balance...or how to get it too.
Then when I test my MyBank class, it hangs up on line 63..which I could swear I have written correctly. Again I am getting a NullPointerException and I honestly think I have the line of code written right, but I'm guessing I dont.
Any help would be appreciated.
public abstract class BankAccount {
public static final String bankName = "BrianBank";
protected String custName;
protected String pin;
protected Transaction[] history;
private double balance;
private double amt, amount;
private double bal, initBal;
private int transactions;
private final int MAX_HISTORY = 100;
private int acct;
protected BankAccount(String cname, String cpin, double initBal) {
custName = cname;
pin = cpin;
balance = initBal;
history = new Transaction[MAX_HISTORY];
transactions =0;
public double getBalance() {
return balance;
public void withdraw(double amt) {
history [transactions] = new Withdrawal (bal, amt);
balance = bal;
amount = amt;
balance -= amt;
transactions = transactions + 1;
public void deposit(double amt) {
history [transactions] = new Deposit (bal, amt);
balance = bal;
amount = amt;
balance += amt;
transactions = transactions +1;
// abstract method to return account number
public abstract int getAcctNum();
// abstract method to return a summary of transactions as a string
public abstract String getStatement();
public class CheckingAccount extends BankAccount implements IncursFee
private int transactions;
private double balance, initBal, amt;
private static final int NOFEE_WITHDRAWALS = 10;
private static final double TRANSACTION_FEE = 5.00;
public static final String bankName = "iBank";
public static final int STARTING_ACCOUNT_NUMBER = 10000;
private int checkingAccountNumber = STARTING_ACCOUNT_NUMBER;
private static int accountNumberCounter = STARTING_ACCOUNT_NUMBER;
private String custName;
private String pin;
public CheckingAccount (String cname, String cpin, double initBal)
super (cname, cpin, initBal);
custName = cname;
pin = cpin;
balance = initBal;
accountNumberCounter++;
checkingAccountNumber = accountNumberCounter;
//initialize a count of transactions
transactions = 0;
public double getBalance()
return balance;
public void withdraw(double amt)
super.withdraw (amt);
transactions ++;
public void deposit(double amt)
super.deposit (amt);
transactions ++;
public int getAcctNum ()
return checkingAccountNumber;
public String getStatement ()
int i = 0;
String output = "";
while ( i < history.length && history[i] != null )
output += history.toString () + "\n";
i++;
return output;
public void deductFee(double fee)
if (transactions > NOFEE_WITHDRAWALS)
{ fee = TRANSACTION_FEE *(transactions - NOFEE_WITHDRAWALS);
super.withdraw(fee);
balance -=fee;
transactions = 0;
public interface IncursFee {
public abstract void deductFee(double fee);
public abstract class Transaction {
protected double initBal;
protected double tranAmt;
// constructor
protected Transaction(double bal, double amt) {
initBal = bal;
tranAmt = amt;
abstract public String toString();
public class Withdrawal extends Transaction
private double initBal;
private double amount;
private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
public Withdrawal (double bal, double amt)
super (bal, amt);
initBal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initBal) + "\n" + "Withdrawal : " + fmt.format(amount);
import java.text.NumberFormat;
public class Deposit extends Transaction
private double initbal, balance;
private double amount;
private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
public Deposit (double bal, double amt)
super (bal, amt);
initbal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initbal) + "\n" + "Deposit : " + fmt.format(amount);
public class TestCheckingAcct {
public static void main(String[] args) {
BankAccount b1 = new CheckingAccount("Harry", "1234", 500.0);
System.out.println (b1.getBalance ());
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(50);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(10);
b1.withdraw(1);
System.out.println(b1.getStatement());
// This interface specifies the functionality requirements of a bank
public interface Bank {
public abstract int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount);
public abstract void processWithdrawal(int accNum, String pin, double amount);
// executes a deposit on the specified acct by the amount
public abstract void processDeposit(int accNum, String pin, double amount);
// returns the balance of acct
public abstract double processBalanceInquiry(int accNum, String pin);
// returns summary of transactions
public abstract String processStatementInquiry(int accNum, String pin);
import java.util.ArrayList;
public class MyBank implements Bank
private ArrayList<BankAccount> savAccounts = new ArrayList<BankAccount>(); //dynamically grows
private ArrayList<BankAccount> chkAccounts = new ArrayList<BankAccount>(); //dynamically grows
private SavingsAccount sav;
private CheckingAccount chk;
private int accNum;
private String customerName, customerPIN, accType, pin;
private double initDepAmount, amount, balance;
public int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount)
this.customerName = customerName;
this.customerPIN = customerPIN;
this.accType = accType;
this.initDepAmount = initDepAmount;
if ( accType.equals("Savings"))
BankAccount savAcct = new SavingsAccount(customerName, customerPIN, initDepAmount);
try
savAccounts.add(savAcct);
catch (ArrayIndexOutOfBoundsException savAccounts)
return savAcct.getAcctNum();
else
CheckingAccount chkAcct = new CheckingAccount(customerName, customerPIN, initDepAmount);
try
chkAccounts.add(chkAcct);
catch (ArrayIndexOutOfBoundsException chkAccounts)
return chkAcct.getAcctNum();
public void processWithdrawal (int accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.withdraw (amount);
if (accNum >50000 && accNum <60000)
sav.withdraw (amount);
public void processDeposit (int accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.deposit (amount);
if (accNum >50000 && accNum <60000)
sav.deposit (amount);
public double processBalanceInquiry (int accNum, String pin)
this.accNum = accNum;
this.pin = pin;
this.balance = 0;
if (accNum >10000 && accNum <20000)
balance = chk.getBalance ();
if (accNum >50000 && accNum <60000)
balance = sav.getBalance ();
return balance;
public String processStatementInquiry(int accNum, String pin)
this.accNum = accNum;
this.pin = pin;
this.statement = "";
if (accNum >10000 && accNum <20000)
statement = chk.getStatement ();
if (accNum >50000 && accNum <60000)
statement= sav.getStatement ();
return statement;Here's some quick code review:
public abstract class BankAccount {
public static final String bankName =
me = "BrianBank";
protected String custName;
protected String pin;
protected Transaction[] history;
private double balance;
private double amt, amount;
private double bal, initBal;
private int transactions;// make MAX_HISTORY private static final, too.
private final int MAX_HISTORY = 100;
private int acct;
protected BankAccount(String cname, String cpin,
pin, double initBal) {
custName = cname;
pin = cpin;
balance = initBal;
history = new Transaction[MAX_HISTORY];
transactions =0;
public double getBalance() {
return balance;
public void withdraw(double amt) {
history [transactions] = new Withdrawal (bal, amt);
balance = bal;
amount = amt;
balance -= amt;// ++transactions above would be elegant.
transactions = transactions + 1;
public void deposit(double amt) {
history [transactions] = new Deposit (bal, amt);
balance = bal;
amount = amt;
balance += amt;
transactions = transactions +1;
// abstract method to return account number// why abstract?
public abstract int getAcctNum();
// abstract method to return a summary of
y of transactions as a string// why abstract?
public abstract String getStatement();
public class CheckingAccount extends BankAccount
implements IncursFee
private int transactions;
private double balance, initBal, amt;
private static final int NOFEE_WITHDRAWALS =
WALS = 10;
private static final double TRANSACTION_FEE =
_FEE = 5.00;
public static final String bankName = "iBank";
public static final int STARTING_ACCOUNT_NUMBER
NUMBER = 10000;
private int checkingAccountNumber =
mber = STARTING_ACCOUNT_NUMBER;
private static int accountNumberCounter =
nter = STARTING_ACCOUNT_NUMBER;// BankAccount has a custName attribute; why does CheckingAccount need
// one if it extends BankAccount?
private String custName;
private String pin;
public CheckingAccount (String cname, String
String cpin, double initBal)
super (cname, cpin, initBal);
custName = cname;
pin = cpin;
balance = initBal;
accountNumberCounter++;
checkingAccountNumber =
tNumber = accountNumberCounter;
//initialize a count of transactions
transactions = 0;
// same as BankAccount - why rewrite it?
public double getBalance()
return balance;
// same as BankAccount - why rewrite it?
public void withdraw(double amt)
super.withdraw (amt);
transactions ++;
// same as BankAccount - why rewrite it?
public void deposit(double amt)
super.deposit (amt);
transactions ++;
// same as BankAccount - why rewrite it?
public int getAcctNum ()
return checkingAccountNumber;
public String getStatement ()
int i = 0;
String output = "";
while ( i < history.length && history[i] !=
ory[i] != null )
output += history.toString () + "\n";
i++;
return output;
public void deductFee(double fee)
if (transactions > NOFEE_WITHDRAWALS)
{ fee = TRANSACTION_FEE *(transactions -
ansactions - NOFEE_WITHDRAWALS);
super.withdraw(fee);
balance -=fee;
transactions = 0;
public interface IncursFee {
public abstract void deductFee(double fee);
public abstract class Transaction {
protected double initBal;
protected double tranAmt;
// constructor
// why protected? make it public.
protected Transaction(double bal, double amt) {
initBal = bal;
tranAmt = amt;
abstract public String toString();
public class Withdrawal extends Transaction
private double initBal;
private double amount;
private static NumberFormat fmt =
= NumberFormat.getCurrencyInstance();
public Withdrawal (double bal, double amt)
super (bal, amt);
initBal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initBal) + "\n" +
+ "Withdrawal : " + fmt.format(amount);
import java.text.NumberFormat;
public class Deposit extends Transaction
private double initbal, balance;
private double amount;
private static NumberFormat fmt =
= NumberFormat.getCurrencyInstance();
public Deposit (double bal, double amt)
super (bal, amt);
initbal = bal;
amount = amt;
public String toString ()
return "Balance : " + fmt.format(initbal) + "\n" +
+ "Deposit : " + fmt.format(amount);
public class TestCheckingAcct {
public static void main(String[] args) {
BankAccount b1 = new CheckingAccount("Harry",
, "1234", 500.0);
System.out.println (b1.getBalance ());
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(50);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.withdraw(1);
b1.deposit(10);
b1.withdraw(1);
System.out.println(b1.getStatement());
// This interface specifies the functionality
requirements of a bank
public interface Bank {
public abstract int openNewAccount(String
String customerName, String customerPIN, String
accType, double initDepAmount);
public abstract void processWithdrawal(int
(int accNum, String pin, double amount);
// executes a deposit on the specified acct by
t by the amount
public abstract void processDeposit(int accNum,
Num, String pin, double amount);
// returns the balance of acct
public abstract double processBalanceInquiry(int
(int accNum, String pin);
// returns summary of transactions
public abstract String
ring processStatementInquiry(int accNum, String
pin);
import java.util.ArrayList;
public class MyBank implements Bank
private ArrayList<BankAccount> savAccounts =
unts = new ArrayList<BankAccount>(); //dynamically
grows
private ArrayList<BankAccount> chkAccounts =
unts = new ArrayList<BankAccount>(); //dynamically
grows
private SavingsAccount sav;
private CheckingAccount chk;
private int accNum;
private String customerName, customerPIN,
erPIN, accType, pin;
private double initDepAmount, amount, balance;
public int openNewAccount(String customerName,
erName, String customerPIN, String accType, double
initDepAmount)
this.customerName = customerName;
this.customerPIN = customerPIN;
this.accType = accType;
this.initDepAmount = initDepAmount;
if ( accType.equals("Savings"))
BankAccount savAcct = new
vAcct = new SavingsAccount(customerName, customerPIN,
initDepAmount);
try
savAccounts.add(savAcct);
catch (ArrayIndexOutOfBoundsException
Exception savAccounts)
return savAcct.getAcctNum();
else
CheckingAccount chkAcct = new
hkAcct = new CheckingAccount(customerName,
customerPIN, initDepAmount);
try
chkAccounts.add(chkAcct);
catch (ArrayIndexOutOfBoundsException
Exception chkAccounts)
return chkAcct.getAcctNum();
public void processWithdrawal (int accNum,
accNum, String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.withdraw (amount);
if (accNum >50000 && accNum <60000)
sav.withdraw (amount);
public void processDeposit (int accNum, String
String pin, double amount)
this.accNum = accNum;
this.pin = pin;
this.amount = amount;
if (accNum >10000 && accNum < 20000)
chk.deposit (amount);
if (accNum >50000 && accNum <60000)
sav.deposit (amount);
public double processBalanceInquiry (int accNum,
String pin)
this.accNum = accNum;
this.pin = pin;
this.balance = 0;
if (accNum >10000 && accNum <20000)
balance = chk.getBalance ();
if (accNum >50000 && accNum <60000)
balance = sav.getBalance ();
return balance;
public String processStatementInquiry(int accNum,
m, String pin)
this.accNum = accNum;
this.pin = pin;
this.statement = "";
if (accNum >10000 && accNum <20000)
statement = chk.getStatement ();
if (accNum >50000 && accNum <60000)
statement= sav.getStatement ();
return statement;
Very bad style with those brace placements. Pick a style and stick with it. Consistency is the key.
Your code isn't very readable.
You don't have a SavingsAccount here anywhere, even though your MyBank uses one.
You use JDK 1.5 generics yet you've got ArrayList as the static type on those declarations. Better to use the interface type List as the compile time type on the LHS.
You have a lot of compile time problems, and some incomprehensible stuff, but I was able to change it enough to my TestCheckingAcct run to completion. No NPE exceptions.
I'm not sure I agree with your design.
No SavingsAccount. The accounts I have ALL incur fees - no need for a special interface there. Savings accounts are usually interest bearing. That's the way they behave differently from checking accounts. Where do you have that?
You rewrite too much code. If you put behavior in the abstract BankingAccount class (a good idea), the whole idea is that concrete classes that extend BankingAccount don't need to overload any methods whose default behavior is correct for them.
I don't know that I'd have separate Deposit and Withdrawal to implement Transaction. I'd make Transaction concrete and have starting balance, ending balance, and a transaction type String (e.g., "DEPOSIT", "WITHDRAWAL")
It'd be good to see some thought put into exception handling. I don't see an OverdrawnException anywhere. Seems appropriate.
No transfer methods from one account to another. I often do that with my bank.
That's enough to get started. -
Issues with using the output redirection character with newer NXOS versions?
Has anyone seen any issues with using the output redirection character with newer NXOS versions?
Am receiving "Error 0x40870004 while copying."
Simply copying a file from bootflash to tftp is ok.
This occurs for both 3CDaemon and Tftpd32 softwares.
Have tried it on multiple switches - same issue.
Any known bugs?
thanks!
The following is an example of bad (NXOS4.1.1b) and good (SANOS3.2.1a)
MDS2# sho ver | inc system
system: version 4.1(1b)
system image file is: bootflash:///m9200-s2ek9-mz.4.1.1b.bin
system compile time: 10/7/2008 13:00:00 [10/11/2008 09:52:55]
MDS2# sh int br > tftp://10.73.54.194
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
TFTP put operation failed:Access violation
Error 0x40870004 while copying tftp://10.73.54.194/
MDS2# copy bootflash:cpu_logfile tftp://10.73.54.194
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
|
TFTP put operation was successful
MDS2#
ck-ci9216-001# sho ver | inc system
system: version 3.2(1a)
system image file is: bootflash:/m9200-ek9-mz.3.2.1a.bin
system compile time: 9/25/2007 18:00:00 [10/06/2007 06:46:51]
ck-ci9216-001# sh int br > tftp://10.73.54.194
Trying to connect to tftp server......
|
TFTP put operation was successfulPlease check with new version of TFTPD 32 server. The error may be due to older version of TFPT server, the new version available solved this error. Files are getting uploaded with no issues.
1. Download tftpd32b.zip from:
http://tftpd32.jounin.net/tftpd32_download.html
2. Copy the tftpd32b.zip file into an empty directory and extract it.
3. Copy the file you want to transver into the directory containing tftpd32.exe.
4. Run tftpd32.exe from that directory. The "Base Directory" field should show the path to the directory containing the file you want to transfer.
At this point, the tftpserver is ready to begin serving files. As devices request files, the main tftpd32 window will log the requests.
Best Regards...
Maybe you are looking for
-
Front Row is taking a LOOOONG time to open movie lists.
Hello I have a Mac Mini Core Duo 1.66 with 512MB RAM. I have an external hard drive for my video files, and the Mini is connected to my 1920x1080 Sharp LCD TV as a monitor. My movie files are located on the external drive, and I have an alias in my "
-
Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.
I have created a simple server (BankImpl), implementing a RMI interface called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl class using "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree in Weblogic se
-
Firefox freezes, must be restarted when acer laptop unplugged/plugged into power source
I have an Acer 3820 that has been pretty solid. Lately, though, every time I plug in or unplug my laptop while using Firefox, the screen freezes, and changing tabs changes which 'tab' is on top, but the content is still the same as the one that it wa
-
RE: Import Duties before supplier invoice
Dear All, We have a one requirement for our client. In certain cases they need to pay import duties immediately before receiving the supplier invoice. Right now, AP Accountant is booking duties only after the supplier invoices have been booked. Is
-
Preparing Lion for resale.
Everytime I use the Lion recovery disk for a fresh installation it starts off by asking me for my Apple ID which raises my first question: if I sell my macbook to someone else will they not be able to reinstall Lion? Secondly, after the OS has reinst