Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5.14 5.1 Write a program that takes the given input to create a packing list for a trip. Call the various methods to complete the

5.14 5.1

Write a program that takes the given input to create a packing list for a trip. Call the various methods to complete the message. Your intro will read "You have an upcoming trip! Here are the things you will need:", you will print "You will need your wallet and phone." for every trip, you will only print "You will need a jacket." when the trip will be cold, and will only print "You will need a passport." when the trip is international.

import java.util.Scanner;

public class LabProgram { public static void main(String[] args) { Scanner input = new Scanner(System.in);

}//end main public static void essentials(){ System.out.println("You will need your wallet and phone."); }//end passport essentials public static void clothes(){ System.out.println("You will need a jacket."); }//end clothes method public static void passport(){ System.out.println("You will need a passport."); }//end passport method public static void intro(){ System.out.println("You have an upcomng trip!"); System.out.println("Here are the things you will need:"); }//end intro method }//end class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

48. Find the characteristic roots of the matrix in Prob. 31.

Answered: 1 week ago