Ntebogeng is running a car wash business in Soshanguve. The business offers three washing services as shown in the table below.
She needs an application that will display the above information. Create such an application for Ntebogeng.Service code Description Cost (R) G Wash and go 50.00 P Wash , dry and polish. 110.00 E Executive wash 150.00
here is my source code:
/* * 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 carwashapp; /** * * @author SETH */ public class CarWashApp { /** * @param args the command line arguments */ public static void main(String[] args) { // declare variables char code1 = 'G', code2 = 'P', code3 = 'E'; String descr1 = "Wash and go" ,descr2 = "Wash,dry and polish", descr3 = "Executive Wash"; double cost1 = 50.00, cost2 = 110.00 ,cost3 = 150.00; System.out.printf("%-6s%-20s%6s\n", "Service code","Description","Cost(R)"); System.out.printf("%-6c%-20s%6.2f\n", code1 ,descr1 , cost1); System.out.printf("%-6c%-20s%6.2f\n", code2 , descr2 , cost2); System.out.printf("%-6c%-20s%6.2f", code3 , descr3 , cost3); } }
here's the output:
Service codeDescription Cost(R) G Wash and go 50.00 P Wash,dry and polish 110.00 E Executive Wash 150.00
My problem is that i can't display it as in the statement.