Please explain what should be the format of the answer and why my code is not verifying. I have tried multiple format variations but nothing works. Thanks for your help.
package com.codegym.task.task19.task1901;
/*
TableAdapter
*/
public class Solution {
public static void main(String[] args) {
ATable aTable = new ATable() {
@Override
public String getCurrentUserName() {
return "Amigo";
}
@Override
public String getTableName() {
return "DashboardTable";
}
};
BTable table = new TableAdapter(aTable);
table.getHeaderText();
}
public static class TableAdapter implements BTable{
private ATable aTable;
TableAdapter(ATable atatble){
this.aTable = atatble;
}
@Override
public void getHeaderText(){
System.out.println("["+aTable.getCurrentUserName()+"] : "+this.aTable.getTableName());
}
}
public interface ATable {
String getCurrentUserName();
String getTableName();
}
public interface BTable {
void getHeaderText();
}
}