Prefix-list Logic -- Need help
Dear All,
I have following prefix list on my internet router for which need to understand the logic.
router bgp xxxx (public AS)
nei x.x.x.x remote-as 4755
neighbor x.x.x.x prefix-list VSNL-ANNOUNCE out
nei y.y.y.y remote-as 1236
neighbor y.y.y.y prefix-list Bharti-ANNOUNCE out
network 203.99.216.0 mask 255.255.254.0
network 203.99.216.0
network 203.99.217.0
ip prefix-list Bharti-ANNOUNCE seq 5 permit 203.99.216.0/24
ip prefix-list Bharti-ANNOUNCE seq 15 permit 203.99.216.0/23
ip prefix-list DENY-ALL seq 5 deny 0.0.0.0/0 le 32
ip prefix-list VSNL-ANNOUNCE seq 10 permit 203.99.217.0/24
ip prefix-list VSNL-ANNOUNCE seq 15 permit 203.99.216.0/23
Please help me to understand the logic of the prefix list.
Because Bharti SP is getting 203.99.216.0/24 networks only & VSNL is getting 203.99.216.0/23 networks.
Dear All,
I have following prefix list on my internet router for which need to understand the logic.
router bgp xxxx (public AS)
nei x.x.x.x remote-as 4755
neighbor x.x.x.x prefix-list VSNL-ANNOUNCE out
nei y.y.y.y remote-as 1236
neighbor y.y.y.y prefix-list Bharti-ANNOUNCE out
network 203.99.216.0 mask 255.255.254.0
network 203.99.216.0
network 203.99.217.0
ip prefix-list Bharti-ANNOUNCE seq 5 permit 203.99.216.0/24
ip prefix-list Bharti-ANNOUNCE seq 15 permit 203.99.216.0/23
ip prefix-list DENY-ALL seq 5 deny 0.0.0.0/0 le 32
ip prefix-list VSNL-ANNOUNCE seq 10 permit 203.99.217.0/24
ip prefix-list VSNL-ANNOUNCE seq 15 permit 203.99.216.0/23
Please help me to understand the logic of the prefix list.
Because Bharti SP is getting 203.99.216.0/24 networks only & VSNL is getting 203.99.216.0/23 networks.
Hi Yogesh,
Prefix lists are more sophisticated forms that Cisco provides for filtering BGP route advertisements. They filter on IP address just as distribute-lists do, however they are easier to read, and require fewer commands to configure.For example
prefix-list xx seq 10 permit 43.10.0.0/16 ge 18
The statement above allows any route announcement in the range of 43.1.0.0 - 43.1.255.255 but that announcement must have a length greater than 18 bits in the mask. This permits you to allow announcements in the range, but not an announcement equalling the entire range (/16), or even announcements of half the range (/17). Only announcments with a length "greater than or equal to" /18 will be permitted.
With your configuration only /24 and /23 in the network will be out via prefic list for vsnl and vice versa for bharathi.
Check out the below link for more information and implementation of prefix list
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a008009456d.shtml
Hope to Help !!
Ganesh.H
Remember to rate the helpful post
Similar Messages
-
Soundtrack Pro making a LOT of files - used to working in Logic, need help
So I'm used to working with Logic Studio/7.2/etc, and it's my first foray into working with Soundtrack Pro at work. My questions are this: When I use the razorblade tool (since I can't find an equivalent to the split tool in logic) in soundtrack to cut up a sequence, it seems to be creating a LOT of extra files:
http://www.1217design.com/pics/stp_question.png is an example of what I mean. Is this supposed to happen? The recorded files themselves were done in FCP and sent to Soundtrack Pro via the Send to STP Multitrack session function.
What I'm trying to find out is: Is this supposed to be happening? How can I stop this from happening? Are all of these extra files necessary in order to export the final project? And what will happen if I delete them?
I just want to know because the folder is now 4.71gb for a 30 second audio file (the final aif export is roughly 30mb), and there's over 200 of these extra files that have been created in the process of working on this project.
If this is what is necessary to work in Final Cut then I won't be able to work with FCP due to size issues (which is a shame as I feel so much more comfortable working within that environment than I do working in FCP).
Thanks for the help in advance,
SeanSean A wrote:
By doing this, will it still create all of those extra files? That's what I'm trying to figure out. Is it just from the blade tool being used?
For all edits, yeah, baby, STP will generate more files than cows create methane.
First, I know what works for me, but I'm still learning, so I strongly encourage you to keep a COMPLETE BACKUP of all projects until you know your workflow. Also, you may have Preferences set up differently than I do, so you may not find the same paths as what I describe here.
When you have an audio file the way you want it, and you're confident that you won't need those edit files again (be SURE) Process > Flatten All Actions (or Audible Actions) and Save that audio file. Then -- as I understand it so far -- you can safely trash all the edits related to that file. (If you use Photoshop or similar visual programs, it's the same idea.)
During my first few weeks of intensive STP work, my drive grew more and more sluggish, for no reasons known to me. I saw disk space shrinking rapidly. Finally I figured it had to have something to do with STP, so I started searching and eventually I found my edits piling up in home/Documents/Soundtrack Pro Documents, especially (for me) in Edited Media. Since they all came from projects I'd finished and exported to AAC and MP3, I was comfortable trashing them all. Suddenly, whoa, I had an extra 12 GB of disk space available.
Just keep those edit files until you are CERTAIN that you know what you're doing and that you're DONE. Otherwise, when some project needs one precious little 3MB turn of a phrase, you may find yourself confronting suicidal or homicidal tendencies.
I welcome further clarification and/or correction from people who know more and can explain it better.
Best,
chuck -
New To Logic need help using drum samples.
Hey guys im extremly new to logic actually this is my first trip into a mac doing pro audio. Ive been using windows in my studio for years and im trying to learn the ins and outs of Logic right now. My question is im using a set of samples (trigger thru middi usually scored out in staff view) call the steven slate samples usually in windows im using the dr008 to load and trigger them. What would be the equivilent in Logic can i load those samples into ultra beat and trigger them off the staff view?? Again very new to logic but i like what im seeing and i just need come exp. help to get started and cought up to where i was on a PC/Sonar System. Thanx for the help in advance
Isn't the dr-008 great? I wish they had a Mac version.
If you're using midi, yes you could configure either UB or the ESX24 with your samples etc.
The closest thing to the dr-008 that I've found for Mac is either iDrum or Battery - it's fun to play with either in the same way as the DR. -
Thanks in advance!
I need help on a menu list logic.
There's this main menu which has 6 list buttons, and second
list with 4 buttons.
When I press on one button, it should load the next list.
Problem I have here is when I click on the one button, it
clears the previous main list buttons (which is what I want). On
the second list, it only shows the last button, aka 4th button.
I've attached my code here below, which is in the first
frame.After posting this the solution hit me.
I had to pass the parameter for the createButton as a "_root"
instead of "this" -
Need help buying a logic board!!!
Hi,
So I posted a while back about my mac failing to boot up. Now I concluded it was the logic board that was faulty. I need help deciphering what the part numbers mean.
My logic board part number is 630-6694/T6690 and model 820-1592-A. This came with the dual 2.0 ghz PPC970fx 90nm model (June 2004). There are boards with the same model number as mine, but different part number prefixes (i.e. 661-xxxx instead of 630-xxxx), so what does this mean????
I would like to really get the latest motherboard that is still compatible with the processors, if that's possible? I have seen different dual socket boards like 820-1760-A, which I'm interested in since it is the Early 2005 model.
Can anyone here with technical knowledge shed some light on what these model numbers and part numbers mean?
Thanks!Hi, if it were me, I'd call one of these and see what'd work, I'm no expert but I hear G5s are really particular...
http://www.dvwarehouse.com/Logic-Boad-for-PowerMac-G5-(Early-2005)-820-1592-A-p-35673.html
http://www.welovemacs.com/6613584.html -
Ip prefix-list modification help
i need to modify my internet edge bgp advertisements to exclude a small slice of the end of our ip space and i can't wrap my brain around what i need to do to modify the prefix list. my company uses the 192.168.0.0 thru 192.168.11.255 ip space and shown below in our existing bgp configuration (slightly modified to protect the innocent). I want to cut out the very last /29 net out of the 192.168.11.0 network.
router bgp 65001
bgp always-compare-med
bgp log-neighbor-changes
bgp bestpath as-path multipath-relax
neighbor 1.1.1.1 remote-as 65002
neighbor 1.1.1.1 ebgp-multihop 255
maximum-paths 2
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 prefix-list mycompany-list out
network 192.168.0.0 mask 255.255.248.0
network 192.168.8.0 mask 255.255.252.0
ip prefix-list mycompany-list seq 70 permit 192.168.0.0/21 le 24
ip prefix-list mycompany-list seq 71 permit 192.168.8.0/22 le 24
now, i know i could just remove the prefix-list and change the advertised networks with the following but i'd really like to know how to do it via a prefix-list.
network 192.168.0.0 255.255.248.0
network 192.168.8.0 255.255.254.0
network 192.168.10.0 255.255.255.0
network 192.168.11.0 255.255.255.128
network 192.168.11.128 255.255.255.192
network 192.168.11.192 255.255.255.224
network 192.168.11.224 255.255.255.240
network 192.168.11.240 255.255.255.248
Any help that anyone can provide is much appreciated!i tried applying your suggestion and we still saw the larger 192.168.8.0/22 supernet being advertised... still missing something.
i tried writing the prefix-list explictitly stating only the networks i wanted advertised but something went wrong and we lost some internet connectivity from the outside so i had to pull things back to the way they were. this is what i tried:
first i added lines 75 thur 105 so the list looked like this:
ip prefix-list stateofnh-list seq 65 deny 192.168.11.248/29 <- your suggestion applied
ip prefix-list stateofnh-list seq 70 permit 192.168.0.0/21 le 24 <- original line
ip prefix-list stateofnh-list seq 71 permit 192.168.8.0/22 le 24 <- oiriginal line
ip prefix-list stateofnh-list seq 75 permit 192.168.8.0/23 <- new stuff starts here
ip prefix-list stateofnh-list seq 80 permit 192.168.10.0/24
ip prefix-list stateofnh-list seq 85 permit 192.168.11.0/25
ip prefix-list stateofnh-list seq 90 permit 192.168.11.128/26
ip prefix-list stateofnh-list seq 95 permit 192.168.11.192/27
ip prefix-list stateofnh-list seq 100 permit 192.168.11.224/28
ip prefix-list stateofnh-list seq 105 permit 192.168.11.240/29
then i removed lines 65 and 71 leaving just this:
ip prefix-list stateofnh-list seq 70 permit 192.168.0.0/21 le 24 <- original line
ip prefix-list stateofnh-list seq 75 permit 192.168.8.0/23 <- new stuff
ip prefix-list stateofnh-list seq 80 permit 192.168.10.0/24
ip prefix-list stateofnh-list seq 85 permit 192.168.11.0/25
ip prefix-list stateofnh-list seq 90 permit 192.168.11.128/26
ip prefix-list stateofnh-list seq 95 permit 192.168.11.192/27
ip prefix-list stateofnh-list seq 100 permit 192.168.11.224/28
ip prefix-list stateofnh-list seq 105 permit 192.168.11.240/29
but like i said, suddenly several sites we host became unavailable from and i quickly peeled everything back. suggestions? -
I Just updated my iPhone 4 to 7.1 oS. I am unable to connet to any network. I keep getting the "searching" No Service" messages on the top let corner of the screen. I also get a notice that says " "Unable to load network list. I need help... How can one resolve this issue?
No it's not stealing. They have an allowance that you can share with so many computers/devices. You'll have to authorize her computer to play/use anything bought on your acct. You can do this under the Store menu at top when iTunes is open on her computer.
As far as getting it all on her computer....I think but I am not sure (because I don't use the feature) but I think if you turn on Home Sharing in iTunes it may copy the music to her computer. I don't know maybe it just streams it. If nothing else you can sign into your acct on her computer and download it all to her computer from the cloud. Not sure exactly how to go about that, I haven't had to do that yet. I wonder if once you authorize her computer and then set it up for automatic downloads (under Edit>Preferences>Store) if everything would download. Sorry I'm not much help on that. -
Need help with drop down list in parameters
Hi All,
I have the following data set:
DEPT1 DEPT2 DEPT3 DEPT4
Commissioner's Office Finance Accounting Accounts Payable
Commissioner's Office Finance Accounting Fiscal Analysis & Repo
Commissioner's Office Finance Accounting
Commissioner's Office Planning,Asset Mgt Asset Management Inventory & Tracking
Commissioner's Office Planning,Asset Mgt Asset Management Mobility & Congestion
Commissioner's Office Planning,Asset Mgt Asset Management Roadway Safety
Commissioner's Office Planning,Asset Mgt Asset Management
Commissioner's Office DesignProj Mgt & Tec Bridge Dsgn Insp Hyd
In plus i have four parameters with searchlight options, the problem is when i select "Finance" from DEPT2 and in the next selection level i'm seeing all the departments "Accounting,Asset Management and Bridge Dsgn Insp Hyd" insted of just "Accounting". What i want is if i select a department in DEPT2, in the next drop down list(DEPT3) i want to see only the departement corresponding to the one i selected in dept2. Please need help.
ThanksHi
First of all you need to be using Discoverer 10g or 11g Plus not 9.0.4. Assuming you have the right version you need to present the parameters in the correct order. You can change the order on the parameters screen by selecting Tools | Parameters from the toolbar. You then use the Move Up and Move Down buttons to place them in the right order so that DEPT1 is offered first, followed by DEPT2, then DEPT3 and then DEPT4.
Next, you need to check the radion button on the bottom of the right-hand side that allows linking of parameters then you make DEPT2 dependent upon DEPT1, with DEPT3 dependent upon DEPT2 and so on.
While this works without hierarchies it works best when you have a hierarchy in place and even better when there is a composite index on the 4 items.
Best wishes
Michael -
Need help regarding Linked List
I'm a beginner who just spent ages working on the following code.. but need help on re-implementing the following using a linked list, i.e. no array is allowed for customer records but you still can use arrays for names, address, etc.. Hopefully I've inserted enough comments..
Help very much appreciated!! Thanks! =]
import java.util.Scanner;
import java.io.*;
public class Bank
/* Private variables declared so that the data is only accessible to its own
class, but not to any other class, thus preventing other classes from
referring to the data directly */
private static Customer[] customerList = new Customer[30];
//Array of 30 objects created for storing information of each customer
private static int noOfCustomers;
//Integer used to store number of customers in customerList
public static void main(String[] args)
Scanner sc = new Scanner(System.in);
menu();
public static void menu()
char choice;
String filename;
int custId,counter=0;
double interestRate;
Scanner sc = new Scanner(System.in);
do
//Displaying of Program Menu for user to choose
System.out.println("ABC Bank Customer Management System Menu");
System.out.println("========================================");
System.out.println("(1) Input Data from File");
System.out.println("(2) Display Data");
System.out.println("(3) Output Data to File");
System.out.println("(4) Delete Record");
System.out.println("(5) Update Record");
System.out.println("(Q) Quit");
System.out.println();
System.out.print("Enter your choice: ");
String input = sc.next();
System.out.println();
choice = input.charAt(0);
//switch statement used to assign each 'selection' to its 'operation'
switch(choice)
case '1': int noOfRecords;
System.out.print("Enter file name: ");
sc.nextLine();
filename = sc.nextLine();
System.out.println();
noOfRecords = readFile(filename);
System.out.println(+noOfRecords+" records read.");
break;
case '2': displayRecords();
break;
case '3': writeFile();
break;
case '4': System.out.print("Enter account ID to be deleted: ");
sc.nextLine();
custId = sc.nextInt();
deleteRecord(custId);
break;
case '5': if(counter==0)
System.out.print("Enter current interest rate for saving account: ");
sc.nextLine();
interestRate = sc.nextDouble();
update(interestRate);
counter++;
else
System.out.println("Error: Accounts have been updated for the month.");
break;
}System.out.println();
}while(choice!='Q' && choice!='q');
/* The method readFile() loads the customer list of a Bank from a specified
text file fileName into customerList to be stored as array of Customer
objects in customerList in ascending alphabetical order according to the
customer names */
public static int readFile(String fileName)
int custId,i=0;
String custName,custAddress,custBirthdate,custPhone,custAccType;
double custBalance,curRate;
boolean d;
/* Try block to enclose statements that might throw an exception, followed by
the catch block to handle the exception */
try
Scanner sc = new Scanner(new File(fileName));
while(sc.hasNext())
/* sc.next() gets rid of "Account", "Id" and "=" */
sc.next();sc.next();sc.next();
custId = sc.nextInt();
d=checkDuplicate(custId);
/* checkDuplicate() is a method created to locate duplicating ids in array */
if(d==true)
/* A return value of true indicates duplicating record and the sc.nextLine()
will get rid of all the following lines to read the next customer's record */
sc.nextLine();sc.nextLine();sc.nextLine();
sc.nextLine();sc.nextLine();sc.nextLine();
continue;
/* A return value of false indicates no duplicating record and the following
lines containing the information of that customer's record is being read
in */
if(d==false)
/* sc.next() gets rid of "Name" and "=" and name is changed to upper case*/
sc.next();sc.next();
custName = sc.nextLine().toUpperCase();
/* sc.nextLine get rids of the following lines to read the next customer's
record if length of name is more than 20 characters*/
if(custName.length()>21)
System.out.println("Name of custId "+custId+" is more than 20 characters");
System.out.println();
sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
continue;
/* sc.next() gets rid of "Address" and "=" */
sc.next();sc.next();
custAddress = sc.nextLine();
/* sc.nextLine get rids of the following lines to read the next customer's
record if length of address is more than 80 characters*/
if(custAddress.length()>81)
System.out.println("Address of custId "+custId+" is more than 80 characters");
System.out.println();
sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
continue;
/* sc.next() gets rid of "DOB" and "=" */
sc.next();sc.next();
custBirthdate = sc.nextLine();
/* sc.nextLine get rids of the following lines to read the next customer's
record if length of date of birth is more than 10 characters*/
if(custBirthdate.length()>11)
System.out.println("D.O.B of custId "+custId+" is more than 10 characters");
System.out.println();
sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
continue;
/* sc.next() gets rid of "Phone", "Number" and "=" */
sc.next();sc.next();sc.next();
custPhone = sc.nextLine();
/* sc.nextLine get rids of the following lines to read the next customer's
record if length of phone number is more than 8 characters*/
if(custPhone.length()>9)
System.out.println("Phone no. of custId "+custId+" is more than 8 characters");
System.out.println();
sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
continue;
/* sc.next() gets rid of "Account", "Balance" and "=" */
sc.next();sc.next();sc.next();
custBalance = sc.nextDouble();
/* sc.next() gets rid of "Account", "Type" and "=" */
sc.next();sc.next();sc.next();
custAccType = sc.next();
if(custAccType.equals("Saving"))
customerList[noOfCustomers] = new Account1(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
sc.nextLine();
noOfCustomers++;
i++;
else if(custAccType.equals("Checking"))
customerList[noOfCustomers] = new Account2(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
sc.nextLine();
noOfCustomers++;
i++;
else if(custAccType.equals("Fixed"))
sc.next();sc.next();sc.next();sc.next();
curRate = sc.nextDouble();
Account3 temp = new Account3(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType,curRate);
customerList[noOfCustomers]=temp;
sc.nextLine();
noOfCustomers++;
i++;
else
System.out.println("Account type not defined.");
if(noOfCustomers==30)
System.out.println("The customer list has reached its maximum limit of 30 records!");
System.out.println();
return noOfCustomers;
//Exceptions to be caught
catch (FileNotFoundException e)
System.out.println("Error opening file");
System.exit(0);
catch (IOException e)
System.out.println("IO error!");
System.exit(0);
/* Bubblesort method used to sort the array in ascending alphabetical order
according to customer's name */
bubbleSort(customerList);
return i;
/* The method displayRecords() displays the data of the customer records on
screen */
public static void displayRecords()
int k;
/* Displaying text using the printf() method */
for(k=0;k<noOfCustomers;k++)
System.out.printf("Name = %s\n", customerList[k].getName());
System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
System.out.printf("Account Id = %d\n", customerList[k].getId());
System.out.printf("Address = %s\n", customerList[k].getAddress());
System.out.printf("DOB = %s\n", customerList[k].getBirthdate());
System.out.printf("Phone Number = %s\n", customerList[k].getPhone());
String type = customerList[k].getAccType();
System.out.println("Account Type = " +type);
if(type.equals("Fixed"))
System.out.println("Fixed daily interest = "+((Account3)customerList[k]).getFixed());
System.out.println();
/* The method writeFile() saves the content from customerList into a
specified text file. Data is printed on the screen at the same time */
public static void writeFile()
/* Try block to enclose statements that might throw an exception, followed by
the catch block to handle the exception */
try
int i;
int n=0;
//PrintWriter class used to write contents of studentList to specified file
FileWriter fwStream = new FileWriter("newCustomers.txt");
BufferedWriter bwStream = new BufferedWriter(fwStream);
PrintWriter pwStream = new PrintWriter(bwStream);
for(i=0;i<noOfCustomers;i++)
pwStream.println("Account Id = "+customerList.getId());
pwStream.println("Name = "+customerList[i].getName());
pwStream.println("Address = "+customerList[i].getAddress());
pwStream.println("DOB = "+customerList[i].getBirthdate());
pwStream.println("Phone Number = "+customerList[i].getPhone());
pwStream.printf("Account Balance = %.2f\n", customerList[i].getBalance());
pwStream.println("Account Type = "+customerList[i].getAccType());
if(customerList[i].getAccType().equals("Fixed"))
pwStream.println("Fixed Daily Interest = "+((Account3)customerList[i]).getFixed());
pwStream.println();
n++;
//Closure of stream
pwStream.close();
System.out.println(+n+" records written.");
catch(IOException e)
System.out.println("IO error!");
System.exit(0);
//Deletes specified record from list
public static void deleteRecord(int id)
int i;
i=locate(id);
if(i==200)
//checking if account to be deleted does not exist
System.out.println("Error: no account with the id of "+id+" found!");
//if account exists
else
while(i<noOfCustomers)
customerList[i] = customerList[i+1];
i++;
System.out.println("Account Id: "+id+" has been deleted");
--noOfCustomers;
//Updates the accounts
public static void update(double interest)
int i,j,k;
double custBalance,addition=0;
for(i=0;i<noOfCustomers;i++)
if(customerList[i] instanceof Account1)
for(j=0;j<30;j++)
addition=customerList[i].getBalance()*interest;
custBalance=customerList[i].getBalance()+addition;
customerList[i].setBalance(custBalance);
else if(customerList[i] instanceof Account2)
continue;
else if(customerList[i] instanceof Account3)
for(j=0;j<30;j++)
addition=customerList[i].getBalance()*((Account3)customerList[i]).getFixed();
custBalance=customerList[i].getBalance()+addition;
customerList[i].setBalance(custBalance);
else
System.out.println("Account type not defined");
System.out.println("The updated balances are: \n");
for(k=0;k<noOfCustomers;k++)
System.out.printf("Name = %s\n", customerList[k].getName());
System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
System.out.println();
/* ================== Additional methods ==================== */
/* Bubblesort method to sort the customerList in ascending alphabetical
order according to customer's name */
public static void bubbleSort(Customer[] x)
int pass, index;
Customer tempValue;
for(pass=0; pass<noOfCustomers-1; pass++)
for(index=0; index<noOfCustomers-1; index++)
if(customerList[index].getName().compareToIgnoreCase(customerList[index+1].getName()) > 0)
tempValue = x[index];
x[index] = x[index+1];
x[index+1]= tempValue;
/* Method used to check for duplicated ids in array */
public static boolean checkDuplicate(int id)
int i;
for(i=0;i<noOfCustomers;i++)
if(id == customerList[i].getId())
System.out.println("Account Id = "+id+" already exists");
System.out.println();
return true;
}return false;
/* Method to seach for account id in array */
public static int locate(int id)
int j;
for(j=0;j<noOfCustomers;j++)
if(customerList[j].getId()==id)
return j;
j=200;
return j;
import java.util.Scanner;
public class Customer
/* The following private variables are declared so that the data is only
accessible to its own class,but not to any other class, thus preventing
other classes from referring to the data directly */
protected int id;
protected String name,address,birthdate,phone,accType;
protected double balance;
// Null constructor of Customer
public Customer()
id = 0;
name = null;
address = null;
birthdate = null;
phone = null;
balance = 0;
accType = null;
/* The following statements with the keyword this activates the Customer
(int id, String name String address, String birthdate, String phone, double
balance) constructor that has six parameters of account id, name, address,
date of birth, phone number, account balance and assign the values of the
parameters to the instance variables of the object */
public Customer(int id, String name, String address, String birthdate, String phone, double balance, String accType)
//this is the object reference that stores the receiver object
this.id = id;
this.name = name;
this.address = address;
this.birthdate = birthdate;
this.phone = phone;
this.balance = balance;
this.accType = accType;
/* The following get methods getId(), getName(), getAddress(), getBirthdate(),
getPhone(), getBalance() return the values of the corresponding instance
properties */
public int getId()
return id;
public String getName()
return name;
public String getAddress()
return address;
public String getBirthdate()
return birthdate;
public String getPhone()
return phone;
public double getBalance()
return balance;
public String getAccType()
return accType;
/* The following set methods setId(), setName(), setAddress(), setBirthdate(),
setPhone and setBalance() set the values of the corresponding instance
properties */
public void setId (int custId)
id = custId;
public void setName(String custName)
name = custName;
public void setAddress (String custAddress)
address = custAddress;
public void setBirthdate (String custBirthdate)
birthdate = custBirthdate;
public void setPhone (String custPhone)
phone = custPhone;
public void setBalance (double custBalance)
balance = custBalance;
public void setAccType (String custAccType)
accType = custAccType;
class Account1 extends Customer
public Account1(int id, String name, String address, String birthdate, String phone, double balance, String accType)
super(id,name,address,birthdate,phone,balance,accType);
this.id = id;
this.name = name;
this.address = address;
this.birthdate = birthdate;
this.phone = phone;
this.balance = balance;
this.accType = accType;
class Account2 extends Customer
public Account2(int id, String name, String address, String birthdate, String phone, double balance, String accType)
super(id,name,address,birthdate,phone,balance,accType);
this.id = id;
this.name = name;
this.address = address;
this.birthdate = birthdate;
this.phone = phone;
this.balance = balance;
this.accType = accType;
class Account3 extends Customer
protected double fixed=0;
public Account3(int id, String name, String address, String birthdate, String phone, double balance, String accType, double fixed)
super(id,name,address,birthdate,phone,balance,accType);
this.id = id;
this.name = name;
this.address = address;
this.birthdate = birthdate;
this.phone = phone;
this.balance = balance;
this.accType = accType;
this.fixed = fixed;
public double getFixed()
return fixed;
Example of a customers.txt
Account Id = 123
Name = Matt Damon
Address = 465 Ripley Boulevard, Oscar Mansion, Singapore 7666322
DOB = 10-10-1970
Phone Number = 790-3233
Account Balance = 405600.00
Account Type = Fixed
Fixed Daily Interest = 0.05
Account Id = 126
Name = Ben Affleck
Address = 200 Hunting Street, Singapore 784563
DOB = 25-10-1968
Phone Number = 432-4579
Account Balance = 530045.00
Account Type = Saving
Account Id = 65
Name = Salma Hayek
Address = 45 Mexican Boulevard, Hotel California, Singapore 467822
DOB = 06-04-73
Phone Number = 790-0000
Account Balance = 2345.00
Account Type = Checking
Account Id = 78
Name = Phua Chu Kang
Address = 50 PCK Avenue, Singapore 639798
DOB = 11-08-64
Phone Number = 345-6780
Account Balance = 0.00
Account Type = Checking
Account Id = 234
Name = Zoe Tay
Address = 100 Blue Eyed St, Singapore 456872
DOB = 15-02-68
Phone Number = 456-1234
Account Balance = 600.00
Account Type = Saving1) When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
2) Don't just post a huge pile of code and ask, "How do I make this work?" Ask a specific question, and post just enough code to demonstrate the problem you're having.
3) Don't just write a huge pile of code and then test it. Write a tiny piece, test it. Then write the piece that will work with or use the first piece. Test that by itself--without the first piece. Then put the two together and test that. Only move on to the next step after the current step produces the correct results. Continue this process until you have a complete, working program. -
hi i need help, i just go a new iPhone 5 and i want to put all my backed up stuff on, but it doesn't show on the list, how do i get all my stuff back and yes i did backup the old phone
Follow the explicit instructions in the article from which the thread was started and restore the device from the backup of the previous device.
-
I need help with event structure.
I am trying to feed the index of the array, the index number can vary from 0 to 7.
Based on the logic ouput of a comparison, the index buffer should increment
or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
(My event code doesn't execute when there is an event at its input /comparator changes its boolean state.
Anyone coded on similar lines? Any ideas appreciated.
Thanks in advance!You don't need an Event Structure, a simple State Machine would be more appropriate.
There are many examples of State Machines within this forum.
RayR -
My iPhone 6 can't find my macbook pro on the airdrop list, although everything is in place, bluetooth, wi fi gets, need help please ?
Dear Niel, thank you but my mac is (MacBook Pro (Retina, 15-inch, Early 2013).
and i can send from it to my iPhone , but not vice versa -
I am trying to export a video as an flv but the list of possible formats is much shorter than it used to be. I cannot find any way to make an FLV using the newest version of Premiere Pro. Need help fast! I am on a Mac
Support for exporting to FLV and F4V has been removed. To learn more, please consult this blog post: removal of FLV and F4V export features from Adobe Media Encoder, After Effects, and Premiere Pro | After Effects regio…
-
will not open after installation. i have tried to install several times with the same results. installation sends a list to firefox each time. need help. willard lee
Can you attach a screenshot or link to the instructions you are following?
You are on the 3.6 release and Firefox 7.0.1 is out. You can download and install the latest release from http://www.mozilla.org/en-US/firefox/new/ if you would like to update now. The 3.6 version will be maintained for a while longer, but you should update when you can. -
Need help for access list problem
Cisco 2901 ISR
I need help for my configuration.... although it is working fine but it is not secured cause everybody can access the internet
I want to deny this IP range and permit only TMG server to have internet connection. My DHCP server is the 4500 switch.
Anybody can help?
DENY 10.25.0.1 – 10.25.0.255
10.25.1.1 – 10.25.1.255
Permit only 1 host for Internet
10.25.7.136 255.255.255.192 ------ TMG Server
Using access-list.
( Current configuration )
object-group network IP
description Block_IP
range 10.25.0.2 10.25.0.255
range 10.25.1.2 10.25.1.255
interface GigabitEthernet0/0
ip address 192.168.2.3 255.255.255.0
ip nat inside
ip virtual-reassembly in max-fragments 64 max-reassemblies 256
duplex auto
speed auto
interface GigabitEthernet0/1
description ### ADSL WAN Interface ###
no ip address
pppoe enable group global
pppoe-client dial-pool-number 1
interface ATM0/0/0
no ip address
no atm ilmi-keepalive
interface Dialer1
description ### ADSL WAN Dialer ###
ip address negotiated
ip mtu 1492
ip nat outside
no ip virtual-reassembly in
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication pap callin
ppp pap sent-username xxxxxxx password 7 xxxxxxxxx
ip nat inside source list 101 interface Dialer1 overload
ip route 0.0.0.0 0.0.0.0 Dialer1
ip route 10.25.0.0 255.255.0.0 192.168.2.1
access-list 101 permit ip 10.25.0.0 0.0.255.255 any
access-list 105 deny ip object-group IP any
From the 4500 Catalyst switch
( Current Configuration )
interface GigabitEthernet0/48
no switchport
ip address 192.168.2.1 255.255.255.0 interface GigabitEthernet2/42
ip route 0.0.0.0 0.0.0.0 192.168.2.3Hello,
Host will can't get internet connection
I remove this configuration...... access-list 101 permit ip 10.25.0.0 0.0.255.255 any
and change the configuration .... ip access-list extended 101
5 permit ip host 10.25.7.136 any
In this case I will allow only host 10.25.7.136 but it isn't work.
No internet connection from the TMG Server.
Maybe you are looking for
-
How can I find and download Media Encoder in Creative Cloud?
I have some MOV files that won't open in Premeire Pro. i thought I'd try Media Encoder, but when i get to my Creative Cloud download page, Media Encoder is not there.
-
Custom Report: the list of IT ROLES of one or more users
Hi all, I want to do a custom report that gives me the list of IT ROLES of one or more users. Anyone could give me some guidelines? Thanks
-
Payment in Alternative Currency
Hi All, We have posted the document with local currency. Afterwards the user wants to change the payment currency for the line item for other currency. That time, the user by mistake enterd wrong value and saved it. Then once cleared, the system post
-
Q - How do I remove Redeye.
-
Hi all, I am a beginer to OWB. I want to know about the Dimension and Cube. What are those objects? In which context can we use that? how to create those objects? Please can you brief about this with an example. if posible please can u suggest any bo