0% found this document useful (0 votes)
6 views3 pages

Pascal's Triangle Java MIDlet Code

The document contains a Java MIDlet class named TrianguloPascal that implements a simple user interface for calculating polynomial roots. It includes a form for user input and commands for displaying results and exiting the application. The code appears to have several syntax errors and unconventional formatting.

Uploaded by

Alecia Wilson
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Pascal's Triangle Java MIDlet Code

The document contains a Java MIDlet class named TrianguloPascal that implements a simple user interface for calculating polynomial roots. It includes a form for user input and commands for displaying results and exiting the application. The code appears to have several syntax errors and unconventional formatting.

Uploaded by

Alecia Wilson
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd

public class TrianguloPascal extends MIDlet implements CommandListener {

Display display;
Form formulario;
Command O! "alir;
TextField txtp!txtb!txtc;
"tringItem #x$!#x%!s$;
public TrianguloPascal&'{
formulario ( ne) Form&*T+I,-./LO D0 P,"C,L*';
txtp ( ne) TextField&*Digite potencia del polinomio*! null! 1!
TextField2-/M0+IC';
formulario2append &txtp';
344 s$(ne) "tringItem&*Mostrar*! null';
formulario2append&s$';43
O ( ne) Command&*5er*! Command2O! 6';
formulario2addCommand&O';
formulario2setCommandListener&t7is';
"alir ( ne) Command&*"alir*! Command208IT! $';
formulario2addCommand&"alir';
formulario2setCommandListener&t7is';
9
public #oid #er&'{
"tring ,x ( txtp2get"tring&';
"tring salto ( *:n*;
int a ( Integer2parseInt&,x';
int i!;;
int<=#ec$(ne) int<$=;
for&i($;i>(a;i??'{
int<=#ec%(ne) int<i=;
for&;(6;;>i;;??'{
if&;((6@@ ;((&iA$''{
#ec%<;=($;
9
else{
#ec%<;=(#ec$<;=?#ec$<;A$=;
9
int C(#ec%<;=;
"tring dato ( "tring2#alueOf&C';
344 #x$2setText&dato';
"tring m(*La ecuacion tiene una unica raiB*;43
formulario2append&dato ? **';
9
#ec$(#ec%;
formulario2append&salto';
9
9
public #oid start,pp&' {
display ( Display2getDisplay&t7is';
display2setCurrent&formulario';
9
public #oid command,ction& Command "! Displayable d'{
if & " (( O'
#er&';
else if &" (( "alir'{
destroy,pp&false';
notifyDestroyed&';
9
9
public #oid pause,pp&' {
9
public #oid destroy,pp&boolean unconditional' {
9
9

You might also like