Help me!! how to merge 3 different program into one

hi all,
i'm having trouble to merge 3 program and then make them run in while loop. i think all those 3 program can be make into class and the switch control them;
for example:
1)choice 1
it goes to the first class
2)choice 2
it goes to second class
3)choice 3
it goes to third class
below are the mentioned program
-----------------first program---------------------------------------
import java.util.Hashtable;
public class GraphToSet1 {
run GraphToSet to get the output from Graph.java and GraphToJava.java
     public static void main(String[] argv) {
     int graph[][] = {
               { 1, 2 }, //graph are repsented in matrix form
               { 2, 3 },
               { 3, 4 },
{ 4, 5},
{ 5, 1 },
          Graph.convert(graph); //convert the graph into matrix by calling the function
//convert() from Graph.java
class Graph {
this function will convert graph that it get fom GraphToSet.java to set
public static void convert(int[][] a) {
int total_rows = a.length;
     int total_cols = a[0].length;
     System.out.println("Graph in matrix form["+total_rows+"]["+total_cols+"] = "); //Displaying the graph in matrix form
for (int rows=0; rows<total_rows; rows++)
          System.out.print("{");
          for (int cols=0; cols<total_cols; cols++)
          System.out.print(" " + a[rows][cols] + ",");
          System.out.println("},");
/* Start of Modified Code */
Hashtable num=new Hashtable(); // New Code
String value=""; // New Code
System.out.println("\nG=(V,E)");
System.out.print("G=({");
for (int k=1; k<=total_rows; k++)
value=String.valueOf(k);
num.put(value,value);
for (int k=1; k<=total_rows; k++)
System.out.print(" "+ (String)num.get(String.valueOf(k))+ ",");
System.out.print(")");
for (int i=0; i<total_rows; i++)
System.out.print("(");
for (int j=0; j<total_cols; j++) //retrieving all the edges from GraphToSet.java
System.out.print(" " + a[i][j]+","); //and print it out
System.out.print(")");
System.out.println("})"); //final output for graph to set
import java.io.*;
import java.util.*;
* Read and print, using BufferedReader from System.in, onto System.out
public class AlgebraToSet {
public static void main(String[] av) {
try {
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Insert the element for algebra :");
System.out.print("\tSet of elements (U) = ");
String inputLine1=is.readLine();
System.out.print("\tOperation over element (Op) = ");
String inputLine2=is.readLine();
System.out.print("\tRelation over element(Rel) = ");
String inputLine3=is.readLine();
System.out.println("Algebra in set form = "+"{"+inputLine1+","+""+inputLine2+","+""+inputLine3+"}");
is.close();
} catch (IOException e) {
System.out.println("IOException: " + e);
public class PairToSet {
pair that need to be transform has to be keyed in here
     public static void main(String[] argv) {
     int pair[][] = {
               { 34,56 }, //pair represented as matrix
          Pair.convert(pair); //converting pair into set by calling mprint() function
//from Pair.java
class Pair {
this function will convert pair that it get fom PairToSet.java to set
     public static void convert(int[][] a) {
          int total_rows = a.length;
          int total_cols = a[0].length;
          System.out.print("Pair = ");
for (int rows=0; rows<total_rows; rows++)
               System.out.print("\t\t[");
               for (int cols=0; cols<total_cols; cols++)
                    System.out.print(" " + a[rows][cols] + ", ");
               System.out.println("]"); //displaying the pair from PairToSer.java
System.out.print("Pair in Set Form =");
               System.out.print("\t{");
                    System.out.print("{" + a[0][0] + "},"); //converting the pair to set by applying array method
System.out.print("{" + a[0][0] + "," + a[0][1] + "}");
               System.out.println("}");

it is possible but u cant do it. as u have posted 3 posts while u can get answer in one.so keep trying thre3 application independently.grrr

Similar Messages

  • How to merge two storage drives into one partition-help

    THis is on an iPad-Please excuse for any typos
    I Am working on a project of restoring a macbook pro from old parts that I found. It works!!! But the HDD that i salvadged is ancient and gets about .15 MBPS. Not good. Its an apple certified and apple branded toshiba HDD-500G at 5400RPM. Yeah. *****
    I am considering buying a new hard drive as a 480GB SSD, and using OWC's Data doubler, adding a second HDD, for all the photos and vids i will be collecting through my work in video and photo. I am considering getting an SSHD (SSD+HDD in an SSD form factor) and using this as the second drive. its not much more expensive (like 10$ more) and itgetsme semi-SSD like performance on a mass scale of storage.
    HOw can I combine these two drives into ONE partition? 480GB will take awhile to fill up, but this is a future proof wall to use.
    I Will eventually invest in an external storage option (2-3 HDDS in one caddy for backups and storing 1080p video all under one roof. depends if the board im using actually has thunderbolt or usb that is fast enough-because of the crappy hdd i cant get it to boot into an OS or go through usb recovery without it freezing. I ahve tried re-applying thermal paste, still doesnt help)
    HOw can i easily partition these two drives into one?
    also, my friend needs a new HDD because bootup times in his macbook pro are at like 2 mins+ and hes running Core 2 Duo, with 8 G ram and 10.9 (Mav) should i recommend an SSHD or an ssd. (He doesnt want an HDD, hes had bad 'voodoo' with em'. Thanks!

    nithya_ram wrote:
    Give me d source code for merging two img files into one img file\\
    If you want someone to do your work for you, simply pay someone. However, if you have a question about code you're currently working on, feel free to ask a specific question here on the forum.

  • How to merge iPhoto v2 libraries into one iPhoto v11 library

    Hi,
    I just are going through a major upgrade from my iBook dual USB (500 MHz Power PC G3, OS 10.4.11) to my brand-new MacBook Pro (2.3 GHz core I5, OS 10.6.8).
    As my old iBook was running so slow, I had splitted my libraries into two using IPhoto Library Manager some years ago running with iPhoto 2. Now I need to merge these two libraries into one and then transfer it to my new computer and let iPhoto 11 upgrade the library at once.
    Based on very helpful earlier threats, I intend to follow the process below:
    Merge libraries using iPhoto Library Manager (registered version) to get one library (on my old computer)
    Copy this library into the Pictures folder of my new computer
    Open iPhoto (shift key will give me the option to select if needed) and it will automatically upgrade my library.
    So far so good - but I experience one issue I did not manage to solve. I use iPhoto Library Manager version 3.5.2 on my old computer, but after starting the merging process it tells me I need iPhoto version 4 at least; but I have version 2 only. I guess I cannot use iPhoto version 11 on my new computer as I first need to merge the libraries as old versions, as the iPhoto version 11 cannot work with the not yet upgraded libraries, can it? I have the IPhoto Library Manager registered version 3.6.8 installed on my new machine.
    Before I make a major mistake to my pictures (> 20 GB): is it possible to upgrade both old libraries separately in iPhoto v11 and then merge them in iPhoto v11?
    Many thanks for your advice!
    Best regards,
    Markus

    Rename the second iPhoto 2 library to something other that iPhoto Library and put it in the Pixtures folder next to the other library on your new MBP.  Then open it with iPhoto11 to convert.
    Once both are converted to the same version you can use iPLM to merge them into a new library.
    HOWEVER if you don't care about any metadata you might have in your last iPhoto 2 library you can use    SyncPhotos
    to import the photos in your iPhoto 2 library into your iPhoto 11 library.
    Here's how it works: 
    1 - it compares the databases and/or album.xml files of Libraries A and B. 
    2 - the files in A that are not in B are imported into B by copying the original files from A into B's Import folder.  
    3 - it then does the same for B. 
    4 - metadata is not copied. 
    It can be used to just copy from A to B and not sync both ways if desired. It will work with 2 libraries that are different versions, i.e. between an iPhoto 08 and iPhoto 09 library.
    OT

  • How to merge serveral layout files into one output file?

    Hi there!
    For my report, I need to get a datasheet with all the customer data from the database and I have to attach a second document - so I've created 2 files (rtf templates) within the layout section.
    But how can I now run my report and these files are merged to one?
    Thank you!
    BR
    Lena

    Hi Lena,
    Have you tried to combine the RTF templates into one template?
    You could use subtemplates or define the contents/logic from your second template into the main template by creating the template like:
    <?template:Template2?>
    your second template logic here
    <?end Template2?>
    And within the main template, you call this <?call@inlines:Template2?>
    Hope this helps.

  • How to collect to different files into one message

    Hi,
    I have the following scenario:
    Two (5Mb) Files with different file structures each ->
    XI (transform and generate a single structure record) ->
    Insert a record in a DB for each new record generated
    Let suppose file1 has order headers - one order per line -and file2 has the corresponding order items - one item per line, e.g;
    File 1
    OrderNr  Description
    1        A
    2        B
    3        C
    File 2
    OrderNr   ItemNr   MaterialCode ....
    1         1        111
    1         2        222
    1         3        555
    2         1        888
    2         2        777
    3         1        111
    Imagine I want to insert a record in the database for
    each order/item like this
    OrderNr  ItemNr Description MaterialCode .....
    1        1      A           111
    1        2      A           222
    1        3      A           555
    My real scenario is a little more complicated but never mind for now.
    I need to collect the two different files with two different file structures into the same message. Although I have read about the subject I am not sure about how to do it using BPM because there isn't any field I could use to correlate file1 with file2 - I can only correlate a record of file1 with several records of file2. I simply know that the two files will be available in a specific directory once a day at 06:00AM.
    First question is:
    How can I collect the two messages originating each from a different file into only one message with two different subtypes one for each file structure?
    Because my background is ABAP I could do it with a workaround for temporarily storing the info from each file into database tables in XI and then correlate the info from the two files to generate a single message.
    Like this
    File1 -> XI -> INSERT DATA XI ZDB1 (via ABAP Proxy or RFC)
    File2 -> XI -> INSERT DATA XI ZDB2 (via ABAP Proxy or RFC)
    Them I could use an event to check when the two tables have all the data from both files. I could then combine the data from the two tables and start another integration process like this
    XI SERVER (ABAP Proxy) -> XI Integration Server -> Third-party (JDBC)
    But this way I would have to code the hole data conversion which is not a good idea from the perspective of XI (EAI/Broker).
    Maybe I sould use BPM. But how?
    Futhermore:
    Is BPM performant enough (we are talking about files with thousand of records)?
    Thanks in advance
    Diz

    Hi,
    for N:1 Multimapping you have to use BPM.
    After going through this weblog you will be quite familiar with how to collect 2 messages into one message.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Steps:
    1. Create a abstract/ inbound / outbound interfaces. (in your case 3 /1/2).
    2. Perform 2:1 Multimapping.
    You can specify more than one message in either side.
    Just go to message tab in MM.
    3. Now follow the blog and you will get a output in the form of abstract interface.
    4. Define JDBC reciever Channel as usual.
    Your database will be updated.
    Just try this out.
    Regards
    Piyush

  • HT5621 I have 2 Apple ID , how I merge the two ID into one .

    I have 2 Apple ID . How do I merge it into one - all apps and notes etc

    You cannot merge Apple ID's, all purchases are assigned to one account and cannot be transferred to another.

  • How to merge three SQL packages into one package?

    Dear Folks, I have three sql pacakges (1d.pks, 1d.pkb , 2d.pks, 2d.pkb, 3d.pks, and 3d.pkb). Each package has slight different code in their body but I need to combine all them into one single package. I can do this manually by comparing each line of code and keep making changes but I was wondering if there is an easier way to do it. Kindly let me know if you need more information. Thanks in advance.

    If you have three pieces of code in any language that do similar things, you would want to refactor them, pulling out common elements into reusable components. It is no different with PL/SQL. Most of the effort in refactoring code goes into figuring out what those reusable components are and figuring out the appropriate interface for those components. Any reasonable IDE will provide you tools that automate the tedious bits of refactoring-- renaming variables, breaking a section of code out as a separate procedure, etc. But since 90% of the work is identifying what and how to refactor the code not in the mechanical task of implementing the actual refactoring, the benefit of using an IDE are not huge-- it's often just as easy to cut and paste in your favorite text editor.
    Justin

  • Stepper motor 8SMC1-USBhF and power meter PM100D: how to merge the two VIs into one and make a XY graph of the current position and the power

    Hi there,
    I have a stepper motor (8SMC1-USBhF) and a power meter (PM100D). I want to measure the power while the stepper motor is moving, and obtain an XY graph with the current position on x axis and the power on y axis. So I just merged the two VIs together by copying and pasting, and created local variables for current position and readout value, and changed them to read, and then linked them to the XY graph, but apparently it doesnt work.
    So could you please instruct me how to merge them and obtain an XY graph appropriately?
    Attached are the two VIs.
    Thank you!
    Attachments:
    PM100D Simple Example.vi ‏42 KB
    StepperMotor.vi ‏97 KB

    Hello,
    The XY graph requires that each datapoint on the X axis corresponds to a datapoint on the Y axis.  To create XY data you will need to creat two arrays of X data and Y data with the same amount of elements then cluster the two arrays together to wire into the XY graph.  As an example take a look at the VI snippet below.  Is there a specific error being thrown?
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • How to merge two Apple IDs into one?

    Is it possible to merge two IDs into one?  I don't want to use the 'hotmail.com' extension anymore.

    No. All purchases remain tied to the AppleID used to obtain them and cannot be transferred.
    tt2

  • How to merge two crystal reports into one in Delphi using TCrpe?

    I am absolutely new to Delphi and Crystal Reports. I figured that I can export a crystal report to pdf like this:
          crpe.Clear;
        crpe.ReportName := 'BasicInfo.rpt';
        crpe.ParamFields[0].CurrentValue := '0';
        crpe.Output := toExport;
        crpe.ExportOptions.Destination := toApplication;
        crpe.ExportOptions.FileName:='C:\CoverSheet.pdf';
        crpe.ExportOptions.FileType:=AdobeAcrobatPDF;
        crpe.Export;
    (Although this is working, please let me know if I am doing it wrong )
    My main problem here is: I have two .rpts "BasicInfo.rpt" and "Details.rpt" and I need to create one pdf out of them in Delphi.
    Is there any way to merge two .rpts and export it into one pdf in Delphi?

    You cannot merge two reports into one PDF - not in any CR SDK. There are 3rd party utilities that will let you do this, but no APIs for this in CR.
    BTW.; What version of CR are you using?
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to merge 3 mail boxes into one

    Is it possible to merge the data in three mail boxes into one box?

    it is possible but u cant do it. as u have posted 3 posts while u can get answer in one.so keep trying thre3 application independently.grrr

  • How to merge 2 vbscript program into 1

    1st program code:
    Dim objShell
    Set objShell = WScript.CreateObject("WSCript.shell")
    objShell.run """C:\Program Files\Altiris\Altiris Agent\aexnsagent.exe"" /uninstall /qn"
    2nd program code:
    strFolderName = "C:\Program Files\Altiris"
    Set fso = CreateObject("Scripting.FileSystemObject")
    If fso.FolderExists(strFolderName) Then
    fso.DeleteFolder strFolderName
    End If
    prakash

    since they share no variable names, you can simply put one after the other.
    I think your question actually is: how to wait for the first part to complete.
    https://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx
    Set objShell = WScript.CreateObject("WSCript.shell")
    objShell.run """C:\Program Files\Altiris\Altiris Agent\aexnsagent.exe"" /uninstall /qn",,true
    strFolderName = "C:\Program Files\Altiris"
    Set fso = CreateObject("Scripting.FileSystemObject")
    If fso.FolderExists(strFolderName) Then
    fso.DeleteFolder strFolderName
    End If
    note I left out the dim statement. Dim declares a variable, but in vbscript, variables are declared automaticly when first used. For simple scripts that's enough.
    (For more complex scritps, use DIM for all your variables and enforce that using 'option explicit')
    https://msdn.microsoft.com/en-us/library/t7zd6etz(v=vs.84).aspx
    MCP/MCSA/MCTS/MCITP

  • How to merge two .mp4 files into one file?---Help!

    When two clients make viedo chats on FMS,FMS saves two clients' audio and video informations into two seperate mp4 files.
    Now I want to get one mp4 file which contaions one cilent's audio and video informations and another client's audio information when recording
    Is there any way to deal with this problem?
    Thanks in advance..

    Hi Tibor,
    Below is the output i got.
    [Tracer_2]<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2015-04-05T23:22:05" EndDate="2015-04-03T11:10:27" StartDate="2015-04-03T11:10:27" Version="14.0 SP5 Patch 11 (Aug 27, 2014)">
        <Rowset>
            <Columns>
                <Column Description="" MaxRange="100" MinRange="0" Name="col1" SQLDataType="1" SourceColumn="col1"/>
                <Column Description="" MaxRange="100" MinRange="0" Name="col2" SQLDataType="1" SourceColumn="col2"/>
                <Column Description="" MaxRange="100" MinRange="0" Name="col3" SQLDataType="1" SourceColumn="col3"/>
            </Columns>
            <Row>
                <col1>1</col1>
                <col2>2</col2>
                <col3>3</col3>
            </Row>
            <Row>
                <col1>11</col1>
                <col2>22</col2>
                <col3>33</col3>
            </Row>
            <Row>
                <col1>a</col1>
                <col2>b</col2>
                <col3>c</col3>
            </Row>
        </Rowset>
    </Rowsets>
    Please find the image below to achieve this. Please note, I have used local variables to assign input xmls and repeat through it. Repeater_0 for Headers and Repeater_1 for body.
    Kindly ignore Doc_0 here, it's for another purpose. Document_1 is what we are focussing on.
    Please note, you would not be able to see columns as those are dynamically created. Still you can map it as shown above.
    Hope this helps.
    Best Regards,
    Swaroop

  • How to merge 2 pdf forms into one print file ?

    I have been using Adobe forms for a year or so.  Now I have the need to merge together 2 PDF print files into 1 within the same ABAP program before writing the file to my server.  To be more exect, I am talking the output coming from structure FPFORMOUTPUT-PDF.  Does anyone out there have some input for me on this issue ?  Regards, Stuart.

    Hi Stuart. Did you find a solution for this problem? Iam facing the same.
    kind regards,
    Anton Pierhagen

  • How to merge many XML files into one?

    Hi: I got a small project to combine many XML files into one and convert the combined XML file in Excel using AppleScript. My XML files look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
    </Metadataobject>
    and like this...
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
    </Metadataobject>
    I get many XML files like this. And I want them to be combined and shown like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <job id="1">
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
        </job>
        <job id="1">
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
        </job>
    </Metadataobject>
    And finally the combined XML file converts in Excel sheet with column headings "Job ID", "From", "Job Name" and so on...
    Or there is another best way to get the same result...
    Thanks

    That is just an intermediary state to get to the excel version. Actually I get many small XML files (as shown above) from client and I want them all combined in an excel sheet with common column headings... like this...
    from
    jobname
      pages
    priority
    timezone
    year
    month
    day
    hour
    id
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    1
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    2
    Thanks for your response.

Maybe you are looking for

  • How do I get an iPhone contact to appear in iCloud?

    I have a contact that shows up on my iPhone, but not in my iCloud (viewed from a MacBook).  How do I get the contact to appear in in both? iPhone version 7.1.1 MacBook OS X version 10.9.4

  • Need Help: Adobe Acrobat Pro 9 Slow Performance on MacPro

    We installed Adobe Acrobat pro as part of Design premium on MACPRO twelve Core 2.93 with 10GB Memory and 27inch Display running OS 10.8.4 We opened high resolution pdf file 170MB with 330pages with 300% Zoom, when we scrolled trough the pages, the re

  • Bad quality in Acrobat and not in Preview

    Hello, When I open a pdf-file with Preview it looks perfect. When I open the same file with Acrobat Pro it looks crappy. Pdf's created by Logic Pro come out with drop-shadows when opened in Acrobat. When opened in Prview they look perfect. What is th

  • Install skipped packages w/o internet connection

    Hi I've installed a fresh Arch Linux (2010.05) on my machine and it uses a relatively wrong driver (Realetk 8169 instead of 8168; Realtek site provides separate drivers for these NICs). Now I want to install the correct driver (8168), but when trying

  • Error formatting Cross-Tab table

    Hello! My CR2008 reports include many cross-tab tables and till now, everything went smoothly. ...till I got the message "Error formatting Cross-Tab table" while viewing the print preview. Technically the error comes up while clicking one of the grou