F
fjordschritt
Wurde gelöst!
Zuletzt bearbeitet von einem Moderator:
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
public Book (String name, String autor, int isbn, double preis) {
this.name = name;
this.autor = autor;
this.isbn = isbn;
this.preis = preis;
}
Book b = new Book(a,b,c,d);
public static void main(String[] args) {
String a = JOptionPane.showInputDialog("Bitte geben Sie den Titel des ersten Buches ein");
String b = JOptionPane.showInputDialog("Bitte geben Sie den Autor des ersten Buches ein");
String c = JOptionPane.showInputDialog("Bitte geben Sie die ISBN Nummer des ersten Buches ein");
String d = JOptionPane.showInputDialog("Bitte geben Sie den Preis des ersten Buches ein");
int m = Integer.parseInt(c);
double n = Double.parseDouble(d);
Book book = new Book(a,b,m,n);
public class Book {
private String titel;
private String autor;
private int isbn;
private double preis;
public Book(String titel, String autor, int isbn, double preis) {
this.titel = titel;
this.autor = autor;
this.isbn = isbn;
this.preis = preis;
}
}
Book book =
int i =
Jetzt müsste ich doch mit der Sortierung beginnen oder?
sortByPrice()
sortByTitel()
sortByAuthor()
sortByISBN()