Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a clase Dell with me attribute name of type String. Include wet and get method for name: String + String pre Me:void Sample

image text in transcribed
1. Create a clase Dell with me attribute name of type String. Include wet and get method for name: String + String pre Me:void Sample Code public class Doll private String name: public Dell public Dell(String) (stane(n):) public void setane(String) public void presse) System.out.printin(II.name); 2. Ghee cas DollApp.java belem. Type and find the output. Write your answer the sheet provided import java.util.Scanner; public class DollApp public static void main() Scanner in new Scanner(System.in); System.out.println("Creating a doll..); Doll dolli new boll(); dolli.presse) doll1 setiane("Rita"); doll1.presse(); System.out.print("Would you like to set name Y/N:>); char choice - in.next().charAt(); in.nextLine(): if((choice (choice'Y' System.out.print("Enter the name: "); Stringate in.nextLine(); dolli.setName(name); > doll1.presse(); Op

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions