Ошибка при наследовании класса
**Помогите исправить ошибку **
import java.util.Scanner;
public class IND_LAB_3 {
public static void main(String[] args) {
Ticket ticket = new Ticket();
Scanner con_in = new Scanner(System.in);
boolean cor_input = false;
System.out.println("Туристическая или санаторная стоимость дороги ");
while (!cor_input) {
if (ticket.setPlan(con_in.nextLine())) {
cor_input = true;
}
}
cor_input = false;
System.out.println("Сложность ");
while (!cor_input) {
if (ticket.setKategory(con_in.nextLine())) {
cor_input = true;
}
}
Touristic touristic = new Touristic();
cor_input = false;
System.out.println("Место");
while (!cor_input) {
if (ticket.setPlace(con_in.nextLine())) {
cor_input = true;
}
}
cor_input = false;
System.out.println("Продолжительность");
while (!cor_input) {
if (ticket.setDate(con_in.nextInt())) {
cor_input = true;
}
}
cor_input = false;
System.out.println("Стоимость питания");
while (!cor_input) {
if (ticket.setCashFood(con_in.nextInt())) {
cor_input = true;
}
}
cor_input = false;
System.out.println("Стоимость проживания");
while (!cor_input) {
if (ticket.setCashRest(con_in.nextInt())) {
cor_input = true;
}
}
cor_input = false;
ticket.Display();
}
public class Ticket {
String SPR = null;
private String placeTicket;
private double cashOfPlace;
private String plan;
private int date;
private int CashFood;
private int CashRest;
private int TotalPrice;
private double summ;
private double SRsum;
private double planSanat;
private double planTouri;
String kategory;
public Ticket() {
Priceset();
}
public Ticket(String placeTicket, int date, double cashOfPlace, int CashFood, int CashRest) {
this.placeTicket = placeTicket;
this.date = date;
this.cashOfPlace = cashOfPlace;
this.CashFood = CashFood;
this.CashRest = CashRest;
Priceset();
}
private void Priceset() {
planSanat = 1.5;
planTouri = 3.1;
}
public void Display() {
System.out.println("Суммарная стоимость всего тура " + (getSumm() + "₽"));
System.out.println("Ср стоимость дня " + getSRsum() + "₽");
}
public String getPlan() {
return plan;
}
public String getPlace() {
return placeTicket;
}
public int getdate() {
return date;
}
public int getCashFood() {
return CashFood;
}
public int getCashRest() {
return CashRest;
}
public double getPricePlace() {
if (this.plan.equals("Туристическая")) {
return planTouri * cashOfPlace;
} else {
if (this.plan.equals("Санаторная")) {
return planSanat * cashOfPlace;
} else {
return 0;
}
}
}
public double getSumm() {
return getPricePlace() + getdate() * (getCashFood() + getCashRest());
}
public double getSRsum() {
return (getSumm() / 2) / getdate();
}
public String getSPR() {
return SPR;
}
public String getKategory(){
return kategory;
}
public boolean setKategory(String kategory){
if(kategory.equals("Легкая")||kategory.equals("Средняя")||kategory.equals("Высокая")){
this.kategory = kategory;
return true;
}
else {
System.out.println("Неверное написание сложности");
return false;
}
}
public boolean setPlan(String plan) {
if (plan.equals("Туристическая") || plan.equals("Санаторная")) {
this.plan = plan;
return true;
} else {
System.out.println("Неверный план");
return false;
}
}
public boolean setPlace(String placeTicket) {
switch (placeTicket) {
case ("Анапа"):
cashOfPlace = 20000;
this.placeTicket = placeTicket;
return true;
case ("Геленджик"):
cashOfPlace = 21000;
this.placeTicket = placeTicket;
return true;
case ("Новороссийск"): {
cashOfPlace = 24000;
this.placeTicket = placeTicket;
return true;
}
default: {
System.out.println("Неверное место назначения");
return false;
}
}
}
public boolean setDate(int date) {
if (date > 0) {
this.date = date;
return true;
} else {
System.out.println("Неверное значение даты");
return false;
}
}
public boolean setCashFood(int CashFood) {
if (CashFood > 0) {
this.CashFood = CashFood;
return true;
} else {
return false;
}
}
public boolean setCashRest(int CashRest) {
if (CashRest > 0) {
this.CashRest = CashRest;
return true;
} else {
return false;
}
}
public boolean setSPR(String SPR) {
if (SPR.equals("Да") || SPR.equals("Нет")) {
this.SPR = SPR;
return true;
} else {
return false;
}
}
}
class Touristic extends Ticket{
public Touristic(String kat){
switch (kategory) {
case ("Легкая"):
SPR = "Нет";
case ("Средняя"):
SPR = "Нет";
case ("Высокая"):
SPR = "Да";
default: System.out.println("Неверное написание сложности");
}
this.SPR = SPR;
}
@Override
public void Display() {
System.out.println("Сложность " + (getKategory()));
System.out.println("Необходимость справки от врача " + (getSPR()));
}
}
}
ОШИБКА В 5 СТРОЧКЕ И 23 java: non-static variable this cannot be referenced from a static context
Хотел сделать проверку ввода в main и после в наследованном классе сложность проверялась через Switch с возращением значения spr (необходимость наличия справки) в основной класс Ticket или с выводом через Touristic.display сторки