osbertapplication.java

来自「该程序有17个java源文件。是经典奥斯波特艺术品商人软件工程例子」· Java 代码 · 共 37 行

JAVA
37
字号
package Osbert;
//OsbertApplication.cpp : Defines the entry point for the application.
//

import java.io.*;

public class OsbertApplication {

  public static void main(String[] args)
  throws IOException {

    boolean dateOK = false;	        // indicates if current date properly entered
    String dateStr = new String();  // string representation of current date
	Date.currentDate = new Date();

	while (!dateOK)
	{
	  System.out.print("Please enter today's date (mm/dd/yyyy): ");

	  dateStr = UserInterface.getString();

	  if (Date.currentDate.parseDate(dateStr))
		dateOK = true;
	  else
	  {
		System.out.println("You entered the date incorrectly.");
		System.out.println("Please use the format mm/dd/yyyy.\n");
	  }

	}
	UserInterface.initiateFiles();
	UserInterface.displayMainMenu ();

  }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?