Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tps.tp1.pack1Decisoes;
- import java.util.Scanner;
- public class P03OpTernario {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- String fase;
- String faseseguinte;
- System.out.println("Introduza a fase");
- fase = keyboard.nextLine();
- if(fase.equalsIgnoreCase("Analysis") || fase.equalsIgnoreCase("Design") || fase.equalsIgnoreCase("Implementation")
- ||fase.equalsIgnoreCase("Testing") || fase.equalsIgnoreCase("Evolution")) {
- faseseguinte = fase.equalsIgnoreCase("Analysis")? ("Design"): (fase.equalsIgnoreCase("Design")? ("Implementation") :
- (fase.equalsIgnoreCase ("Implementation")?("Testing"): (fase.equalsIgnoreCase("Testing")?("Evolution"):
- (fase.equalsIgnoreCase("Evolution")?("Analysis"):("inválida")))));
- System.out.println("Próxima Fase:" + faseseguinte);
- }
- else {
- System.out.println("Fase inválida");
- }
- keyboard.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement