Zum Inhalt springen

mochito80

Mitglieder
  • Gesamte Inhalte

    2
  • Benutzer seit

  • Letzter Besuch

Alle Inhalte von mochito80

  1. Das Programm wurde nicht von mir geschrieben. Ich soll nur eine test data code schreiben um das programm zu testen.
  2. Hallo, ich bin ein java anfänger ich habe eine bubblesort classe und eine ListItem Classe. Und ich weiß nicht kann ich eine Test generator main code Und eine Junit testcase schreiben kann. Hier ist mein Bubblesort code: import java.util.List; public class bugSort{ public static ListItem bugSort (ListItem x) { List <Integer> input = recordListNodes (x); boolean change = true; ListItem p, yn, t, head; if (x == null) return null; while (change){ p = null; change = false; ListItem y = x; yn = y.n; while (yn != null){ if (y.data > yn.data){ change = true; t = yn.n; y.n = t; yn.n = y; if (p == null){ x = yn; } else{p.n = y.n; } p = yn; yn = t; } else { p = y; y = yn; yn = y.n; } } } assert permutation (x, input); assert ascendingOrder (x); return x; } private static List<Integer> recordListNodes (ListItem x){ return null; } private static boolean permutation(ListItem x){ return false; } } und die LIstItem Klasse: public class ListItem { public ListItem n; public int data; } danke , wenn Sie mir helfen können. Muchi

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...