Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help with question #6 please. liebling@ Exercises If the user selects the d

ID: 3714136 • Letter: N

Question

Need help with question #6 please.

liebling@ Exercises If the user selects the delete option, issue an error message if the database is empty. Otherwise, prompt the user for an ID number. If the ID number does not exist, issue an error message. Otherwise, do not access the record for any future processing empty. sales value, and change the sales value for the record. If the user selects the change option, isue an error message if the database is Otherwise, prompt the user for an ID number. If the requested record does not exist, issue an error message. Otherwise, prompt the user for a new lay them 493 f a list is its st contains pplication ean, and After each option executes, display the updated database in ascending order by Salesperson ID number, and prompt the user to select the next action. Save the annlication as SalespersonDatabase.java. of n is the file as 6 Write an application tnar stores at least four different course names and meeting days and times in a two-dimensional array. Allow the user to enter a course name (such as "CIS 110"), and display the day of the week and time that the course is held (such as "Th 3:30"). If the course does not exist, display an error message. Save the file as Schedule.java Create ing and e file as ableo sttows the various services offered by a hair salon, including its prices and times required: mpts which time. Service Description Cut Shampoo Manicure Style Price (S) 8.00 4.00 18.00 48.00 1800 Time (Minutes) 15 10 30 ects and r an the r 35

Explanation / Answer

Program plan:As per the question the two dimensional array can be created which holds the course names and the date and time for the meeting.

Program:

package practice;

import java.util.*;

public class Schedule {

public static void main(String args[])

{

int x=0;

String[][] course={

{"CIS100","mon 10.00"},

{"CIS101","tue 11.00"},

{"CIS102","wed 10.30"},

{"CIS103","thu 10.00"},

{"CIS104","fri 11.00"}};

Scanner s=new Scanner(System.in);

System.out.println("enter coutrse name to get schedule:" );

String c=s.next();

for(int i=0;i<5;i++)

{

if(course[i][0].equalsIgnoreCase(c))

{

for(int j=0;j<2;++j)

{

System.out.println("course time is"+course[i][j]);

}

}

else x++;

}

if(x!=0)

System.out.println("COurse not listed");

}

}

Sample output:

enter coutrse name to get schedule:
CIS103
course time isthu 10.00

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote