Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6.11 Course Info (Individual Assignment) This is an indwidusl Atsignment. You must complete this assignment on your own. - Do not colutugnint or share code

image text in transcribed
image text in transcribed
image text in transcribed
6.11 Course Info (Individual Assignment) This is an indwidusl Atsignment. You must complete this assignment on your own. - Do not colutugnint or share code with other students. - Do nel bopy and paste code from arywhere - Do nof ube any resourtwes outside of those provided in the course materials. - Do not use any langusge features that have not been covered to this point in the course materials. - If you gir stunk or nood hilp please une only the help system provided in this course. Required Skills Iriventory - Uoe varables to name, stcre, and retrieve values - Vse Eyeten, out. print to prompt the user for input - Use a scanner nextzi ne method to collect user input - Uae ittring methods (ike indexof, lastindexor, length, charat, and substring) to construct expressions - Use tateger,perse int method to parse a string value to an int value - Use Dtring literals and string variables and concatenation to construct String expressions - Ourpur to oonsole with syaten, out,print in Problem Description and Given Info You mwat write s program that take as in inout, a string containing the information for a course. This course infomation Strine formatted the the Problem Description and Given Info You mert wrhe a progam that take as in inout, astring containing the information for a oourse. This course information wif aivays be a string formbsted like this csubject> ceoarne_ hubber? 110.11178 Frinelples of Progranaing Note thet the fou pieces of information in this string are each seporated by a single space character. You can safely astume flor this atsigrment) that the input to your program will always follow this format: Yout program munt collect and store this full course information in a single string variable You should use the scanner nextLine method to colect 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 tiele muet be stored in string variables. The course number and section number must be stored in int. vanables. Finaly. you program must pint out the four pieces of information on separate lines, as show in the examples below Here are some tiamples of what the user should see when the program runs Example 1 Ehter course info i cst 1101117 Frinelples of progranning tubject. I Cst Dection Muaber : 1117s Costae Title i Frineiples of Progranaing Example 2 - length - indexot - Iartindexbt - subetring - ehikint Remember than the indorot meehod has s variacion that takes two arguments, where the firut argument is the fext to look for, and the Hoond argumert in the index so thant looking at return the itt value 9 , becalset the fint spoce cocuring in the string that comes at or after index 4 in at index 9 Hemenber that you can use the thteget oparsetat inethod to parse s string value to an int value. For example. given a string Iht apel = teteger-pereetet (hgei), Need Help? Additonn help tesouroes are avalable by cicking on the words "Need Help? at the bottom of this poge, and search for help or ask a question! 20/100 Courseinfo.java Load default tamplate

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

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions