Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Classes X Classwork for AP CSX replit - Unit 5 Revie x C Java Programming l x M Your question was e x C Classes

image text in transcribed

Classes X Classwork for AP CSX replit - Unit 5 Revie x C Java Programming l x M Your question was e x C Classes X Classwork X + X Apps repl.it/student/submissions/10571230 FTC Coach & Team. Photoshop Portable... a Amazon.com Shop.. Download your NA... replit Unit 5 Review: Riddle Class my repls student notifications 88 talk tonerye (0) - back to classroom run Due: Jan 29, 2020 11:59 pm submit Instructions from your teacher: NM Mainavo Riddlejava : 1Flass Main public static void main(String[] args) { Riddle ri = new Riddle("what has no lock no hinges no lid, yet inside golden treasure is hid"); Riddle r2 = new Riddle("an egg"); Riddle r3 = new Riddle(); Write a Riddle class that has 2 instance variables for the riddle's question and answer, a constructor that initializes the riddle, and 2 methods to ask the riddle and answer the riddle. 1. Add a main method that constructs at least 3 Riddle objects and calls their methods to ask and answer the riddle. You can look up some good riddles online 2. This exercise is worth 10 points. To earn all 10 points, you must add comments, your code must work, and all requirements must be met. N System.out.println(ri. askRiddle()); System.out.println(r2.answereRiddle(); java version "1.8.2_31" Java (TM) SE Runtime Environment (build 1.8.@31-b13) Java HotSpot (TM) 64-Bit Server VM (build 25.31-be7, mixed mode) : Type here to search a g e SA A . 4 8-06 AM 109220202

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_2

Step: 3

blur-text-image_3

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions