i was doing my final year project.i need to do calculator.fuzzy calculator.in that calculator,the user will insert 4 numbers.that number should be transform into trapezoidal shape..but i don't know how to do it..from the number we insert into trapezoidal shape.somebody please help me...

Well, show us what you have.

I am quite sure, however, that the meaning of the "four numbers" is fully described in the homework description, however.

(valA.getText().equals("")||valB.getText().equals("")||valC.getText().equals("")||valD.getText().equals("")..
then,the user should insert 4 numbers in different box..
from that number,they can be perform in trapezoidal shape..

Okay? That tells me nothing. You should not, however, be thinking that I will be writing any part of this for you though. Just so you don't get your hopes up.

From a PM

can u help me with that trapezoidal matter?
really need it..
i have to submit it..
i am math student..
so,i don't know anything about java...

No, we are not here to do your (home)work for you. You wouldn't be given an assignment to program something if you weren't in a programming course, or if a programming course were not a prerequisite for your current course. What your major is doesn't matter. You signed up for the course, you do the work.

We are more than happy to point you in the right direction, but we are not going to right it for you.

P.S. Keep the discussion here, PM's asking for help are usually discarded out-of-hand, or posted for public consumption.

IS this helpful?

 if (valA.getText().equals("")||valB.getText().equals("")||valC.getText().equals("")||valD.getText().equals(""))
    {
       javax.swing.JOptionPane.showMessageDialog(null, "Please fill in the all NUMBER", "Error...!!!", javax.swing.JOptionPane.ERROR_MESSAGE);
    }
    else
    {
        try
         {

        double Valuea,Valueb,Valuec,Valued;

        double ValA = Double.parseDouble(valA.getText());
        double ValB = Double.parseDouble(valB.getText());
        double ValC = Double.parseDouble(valC.getText());
        double ValD = Double.parseDouble(valD.getText());


         if ((ValA <= ValB)&& (ValB <= ValC)&& (ValC <= ValD))

        {

           if((ValA>0)&&(ValB>0)&&(ValC>0)&&(ValD>0))
           {

           Valuea = Math.sqrt(((ValB-ValA)*0)+(ValA));
           Valueb = Math.sqrt(((ValB-ValA)*1)+(ValA));
           Valuec = Math.sqrt(((ValC-ValD)*1)+(ValD));
           Valued = Math.sqrt(((ValC-ValD)*0)+(ValD));

                String fmt = "0.000";
                DecimalFormat myFormatter = new DecimalFormat(fmt);
                String output1 = myFormatter.format(Valuea);
                String output2 = myFormatter.format(Valueb);
                String output3 = myFormatter.format(Valuec);
                String output4 = myFormatter.format(Valued);


            Result.setText(output1+","+output2+","+output3+","+output4);

           }

           else
           {
                javax.swing.JOptionPane.showMessageDialog(null, "Please enter positive number", "Error...!!!", javax.swing.JOptionPane.ERROR_MESSAGE);

        }}
        else
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Please enter the number in increasing order", "Error...!!!", javax.swing.JOptionPane.ERROR_MESSAGE);


        }}
        catch (NumberFormatException nfe2)
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Please enter NUMBER ONLY...!!!.", "Error...!!!", javax.swing.JOptionPane.ERROR_MESSAGE);
            }

    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.