
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Hello! I am having trouble with my intro to JAVA course. I have basic understanding of it, I am failing to get the gets/sets and the DEMONSTRATION part of the assignment. TIA for the help

Transcribed Image Text:**Description:**
Create a class (without main) and a demo program which uses the class on a topic of your choice.
**Class:**
- Create a class which has at least 1 static variable and 3 instance variables.
- All variables in this class should be private.
- Overload the constructor.
- Public gets and sets for each variable.
- Create a print method that accepts an object parameter and simply prints out all items in the object.
- Create a private method that is called by a public method.
**Demonstration/Main File:**
- Create a demo program that uses the sets and gets. (Create an object from your class. Then use sets/gets.)
- Use each of the overloaded methods or constructors.
- Call the print method sending it an object argument.
- Call the public method that calls a private method to show it going into the private via public.
---
If you find yourself uncertain as to what class to make, you can create a class you plan to use in your project. Or, a couple ideas:
- **Prescription:** instance variables could be substance_name, strength, dose, frequency_taken
- **Gaming:** character stats - class (warrior, paladin, etc), race, strength, agility, life, etc
- **MenuPlanner:** itemDescription, category (veggie, meat, etc), calories, carbs, salt
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- I am not sure how to do this problem recursively DO NOT use System.exit(). DO NOT add project or package statements. DO NOT change the class name. DO NOT change the headers of ANY of the given methods. DO NOT add any new class fields (instance variables). ONLY display the result as specified by the example for each problem. DO NOT print other messages, follow the examples for each problem. You may USE the StdOut library. On RecursiveAppend.java write a recursive method appendNTimes that receives two arguments, a string and an integer. The method appendNTimes returns the original string appended to the original string n times. Use the following method header:public static String appendNTimes (String original, int n) Examples: appendNTimes("cat", 0) returns “cat” appendNTimes("cat", 1) returns “catcat” appendNTimes("cat", 2) returns “catcatcat” The following restrictions apply to method appendNTimes: the CODE MUST BE RECURSIVE Do not use loops (while, do/while, or for).…arrow_forwardFor debugging, there are benefits and drawbacks to using print statements and manual walkthroughs. Discuss.arrow_forwardWhat is the difference between the static and final keywords in Java? Can you define any variable in your project as a final or static? Why?arrow_forward
- Complete documentation and a Java implementation are needed. Make some kind of code that embeds your name in a red circle with a blue border.arrow_forwardWhen do we say something is "debugged?" I don't see how this relates to actual testing.arrow_forwardThis is an incomplete code. Where are the implementations for each method you mentioned in the comments? I need the implementation logic (code) for each method you mentioned in the comments. Please include the code implementation logic for each method instead of the comments.arrow_forward
- What are the different types of variables are there in Java? Name at least three and discuss their characteristics.arrow_forwardTHIS IS MEANT TO BE IN JAVA. What we've learned so far is variables, loops, and we just started learning some array today. The assignment is to get an integer from input, and output that integer squared, ending with newline. But i've been given some instructions that are kind of confusing to me. Please explain why and please show what the end result is. Here are some extra things i've been told to do with the small amount of code i've already written... Type 2 in the input box, then run the program so I can note that the answer is 4 Type 3 in the input box instead, run, and note the output is 6. Change the output statement to output a newline: System.out.println(userNumSquared);. Type 2 in the input box Change the program to use * rather than +, and try running with input 2 (output is 4) and 3 (output is now 9, not 6 as before). This is what I have so far... import java.util.Scanner; public class NumSquared {public static void main(String[] args) {Scanner scnr = new…arrow_forwardQuestion 2 This question provides an opportunity for you to demonstrate your understanding of the problem-solving approach taught in TM112 and the patterns introduced in Block 1 Part 4 and Block 2 Part 2. You can find an overview of the problem-solving approach and a list of all the patterns TM112 teaches in the Problem solving and Python quick reference and you will need to refer to this document as you work on the question. Important note: you do not need to get a working program in part a. in order to attempt part b. A student wants to design and implement a Python program to convert any 6-bit unsigned binary number to its decimal equivalent. There are many ways of doing this, but here is their initial top-level decomposition: • > Convert binary to decimal o >> Input a list of six 1s and 0s corresponding to the binary number to be converted o >> Input a list of six column weightings consisting of powers of two o >> Create a new list that contains the…arrow_forward
- Choose an aspect of a game or simulation in which strategizing the next move against an opponent or the computer is an essential component. Adapt the concepts of minimax algorithm, alpha-beta pruning, and utility function. A brief description of the game or simulation. A brief description of the search methods which are used. A flowchart detailing the logic of the algorithm(s) implemented. Describe the Python code for this project. This includes any classes needed that are not part of a Python library.arrow_forwardGive examples of five particular methods you may use to make your writing better.arrow_forwardCan somebody explain the meaning of the term "prototype method" to me?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education