Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You must write a program that take as in input, a String containing the information for a course. This course information will always be a
You must write a program that take as in input, a String containing the information for a course. This course information will always be a String formatted like this:
Here is an example:
CSE Principles of Programming
Note that the four pieces of information in this String are each separated by a single space character.
You can safely assume for this assignment that the input to your program will always follow this format.
Your program must collect and store this full course information in a single String variable. You should use the Scanner nextLine method to collect the input as a single String. Your program must then extract the four pieces of information and store each in separate variables. The subject and title must be stored in String variables. The course number and section number must be stored in int variables. Finally, you program must print out the four pieces of information on separate lines, as show in the examples below.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started