1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Firlakuza [10]
3 years ago
10

Carly’s Catering provides meals for parties and special events. Write a program that prompts the user for the number of guests a

ttending an event and then computes the total price, which is $35 per person. Display the company motto with the border that you created in the CarlysMotto2 class in Chapter 1, and then display the number of guests, price per guest, and total price. Also display a message that indicates true or false depending on whether the job is classified as a large event—an event with 50 or more guests. Save the file as CarlysEventPrice.java.
Computers and Technology
1 answer:
Savatey [412]3 years ago
6 0

Answer:

Answered below

Explanation:

Scanner n = new Scanner(System.in);

System.out.print("Enter number of guests: ");

int numOfGuests = n.nextline();

double pricePerGuest = 35.0;

double totalAmount = numOfGuests * pricePerGuest;

String event = " ";

if ( numOfGuests >= 50){

event = "Large event";

}else{

event = "small event";

}

System.out.print(numOfGuests);

System.out.println(pricePerGuest);

System.out.println( totalAmount);

System.out.println(event);

You might be interested in
Write a simple algorithm in pseudocode that asks the user their favourite colour and then agrees with their choice, quoting the
olga55 [171]

Answer:

i am still a beginner in this but i hope it helps.

  • add scanner object;
  • declare string FavColour;
  • print msg to ask user for input
  • scan input FavColour;
  • print msg (" your favourite colour is " + FavColour)

3 0
3 years ago
The ticketing system at the airport is broken, and passengers have lined up to board the plane in the incorrect order. This line
wolverine [178]

Answer:

See explaination

Explanation:

The program code

import java.util.ArrayList;

public class Main

{

public static void main(String[] args)

{

ArrayList<AirlineTicket> tickets = new ArrayList<AirlineTicket>();

//This creates a randomized list of passengers

addPassengers(tickets);

for(AirlineTicket elem: tickets)

{

System.out.println(elem);

}

//This creates a TicketOrganizer object

TicketOrganizer ticketOrganizer = new TicketOrganizer(tickets);

//These are the methods of the ticketOrganizer in action

System.out.println("\nPassengers Ordered by Boarding Group:");

ticketOrganizer.printPassengersByBoardingGroup();

System.out.println("\nPassengers in line who can board together:");

ticketOrganizer.canBoardTogether();

}

//Do not touch this method! It is adding random passengers to the AirlineTicket array

public static void addPassengers(ArrayList<AirlineTicket> tickets)

{

String[] seats = {"A","B","C","D","E","F"};

for(int index = 0; index< 15; index++)

{

int random = (int)(Math.random() * 5);

AirlineTicket ticket = new AirlineTicket("Passenger " + (index+1), seats[random], ((int)(Math.random()*5)+1), ((int)(Math.random()*8)+1));

tickets.add(ticket);

}

}

}

class TicketOrganizer

{

private ArrayList<AirlineTicket> tickets ;

//constructor with parameter as an arraylist of AirlineTicket

public TicketOrganizer(ArrayList<AirlineTicket> tickets)

{

this.tickets = tickets;

}

//methhods to return the arraylist of airlines

public ArrayList<AirlineTicket> getTickets()

{ //re-organize the ticket first

ArrayList<AirlineTicket> tickets_organized = new ArrayList<AirlineTicket>();

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

{

for(AirlineTicket ticket: tickets)

{

if(ticket.getBoardingGroup() == i)

{

tickets_organized.add(ticket);

}

}

}

return tickets_organized;

}

//print the tickets based on boardingGroup

public void printPassengersByBoardingGroup()

{

int count = 0;

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

{

System.out.println("Boarding Group " + i + ":");

for(AirlineTicket ticket : tickets)

{

if(ticket.getBoardingGroup() == i)

{

System.out.println("Passenger " + ticket.getName());

}

}

}

See attachment for sample output

4 0
4 years ago
In the admin console, which three of these gmail settings can an administrator set for the entire domain? (choose 3)
ehidna [41]
<span>In the admin console, three settings than an admin can set for the entire domain in gmail are to enable users to set their own themes in gmail, allow users to delegate their mail out to other users, and enable users to have the ability to import their email from other platforms like yahoo, web mail, or hot mail.</span>
5 0
4 years ago
Which of the following expressions shows the correct amount of sales tax for the computer at Store A? Select all that apply.
Anastasy [175]

Answer:

6%($1,200)  0.06($1,200)  3/50($1,200)

Explanation:

hope this helps sorry if i am wrong

have a nice day

6 0
3 years ago
Read 2 more answers
Difference between first and second generation of computers. <br>​
Harman [31]

\mathcal{\fcolorbox{black}{orange}{\pink{Question:}}}

Difference between first and second generation of computers.

\mathcal{\fcolorbox{black}{orange}{\red{Answer:}}}

Refer to attachment.!

<h3>Hope It's helped mate! :)</h3>

7 0
3 years ago
Other questions:
  • A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
    6·1 answer
  • Customer A with a Bronze service level package calls in a Critical System Failure at 9:00 AM. Customer B with a Silver service l
    15·1 answer
  • Write a statement that computes the square root of a variable called discriminant
    11·1 answer
  • Which phrase best describes a spreadsheet?
    5·2 answers
  • In computer Drag and Drop“ means to select the items, hold down the mouse and
    15·1 answer
  • I need it ASAP, brainliest to whoever answers correctly!
    10·1 answer
  • How do i recover a google account that was deleted?
    7·1 answer
  • When applying a filter to a text layer, how can you ensure that the types editability is not lost
    12·1 answer
  • 16 Select the correct answer. Rachel has set up a computer network. In this network, due to a device, the computers partake in t
    6·1 answer
  • Two things every professional PowerPoint presentation should have
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!