Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED HELP ASAP BookInformation.java arrow_drop_down import java.util.Scanner; public class BookInformation { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); Book myBook

I NEED HELP ASAP

image text in transcribed

BookInformation.java

arrow_drop_down

import java.util.Scanner;

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

Book myBook = new Book(); Encyclopedia myEncyclopedia = new Encyclopedia();

String title, author, publisher, publicationDate; String eTitle, eAuthor, ePublisher, ePublicationDate, edition; int numPages;

title = scnr.nextLine(); author = scnr.nextLine(); publisher = scnr.nextLine(); publicationDate = scnr.nextLine();

eTitle = scnr.nextLine(); eAuthor = scnr.nextLine(); ePublisher = scnr.nextLine(); ePublicationDate = scnr.nextLine(); edition = scnr.nextLine(); numPages = scnr.nextInt();

myBook.setTitle(title); myBook.setAuthor(author); myBook.setPublisher(publisher); myBook.setPublicationDate(publicationDate); myBook.printInfo();

myEncyclopedia.setTitle(eTitle); myEncyclopedia.setAuthor(eAuthor); myEncyclopedia.setPublisher(ePublisher); myEncyclopedia.setPublicationDate(ePublicationDate); myEncyclopedia.setEdition(edition); myEncyclopedia.setNumPages(numPages); myEncyclopedia.printInfo();

} }

image text in transcribedimage text in transcribed

10.16 LAB: Course information (derived classes) Given main0, define a Course base class with methods to set and get private fields of the following types: - String to stare the course number - String to stare the course ttle Define Course's Pr ntinfol) mathod that outputs the course number and title. Then, define a derived class of feredCourse with methods to set and get private fields of the following types. - String to store the instructor's rame - String to stare the locaticr - String to stare the class time Ex. If the input is: ECE287 Digital Systens Design ECE387 Fmbedded 5yst.ema Design Wark Patleryon Wi1son Ha11 231 WF; 2-3:30 pr the output is: When done developing your program, press the Submit for grading button below. This will submit your program for auto grading. Codrg trai of your work 1/20E0,0,0,0,0,00,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0min:24 When done developing your program, press the Submit for grading button below. This will submit your program for auto grading Codrg trai of your work 1/20E,0,0,0,0,0,00,0,0,0,0,0,0,0,0,00,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0min:24

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

More Books

Students also viewed these Databases questions