-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathView.java
More file actions
44 lines (32 loc) · 1.11 KB
/
View.java
File metadata and controls
44 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gruppeinnlevering;
import java.util.Iterator;
/**
*
* @author norby
*/
public abstract class View extends ApplicationUI {
public abstract Literature createLiterature();
public abstract void getSearchOptions();
/**
* prints out a list of hits of the given publisher name
*/
void findPeriodicalLiteratureByPublisher() {
System.out.println("type in publisher name");
System.out.println("\n");
String searchString = validInput.stringScanner();
Iterator<Literature> search = register.getIteratorPublisher(searchString);
if (!search.hasNext()) {
System.out.println("\nSorry Bro,couldn't find what you were looking for. Please try again\n");
findPeriodicalLiteratureByPublisher();
}
while (search.hasNext()) {
System.out.println(getDetails(search.next()));
System.out.println("\n");
}
}
}