
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Note:- Please read this java program plan (IMAGE-1) before starting to type code and then read the java program question (IMAGE-2) and please type this java code and include all the stuff given in (IMAGE-1). Also, need an output for this java code and please provide all the things that have been asked to include in the java code.
Program Plan (Image):- Question -2(ADTs)
Question (Image):- Question-2

Transcribed Image Text:2. NoteADT - Show the interface and all abstract methods
NoteDataStructureClass - Show the following methods: default constructor, overloaded
constructor, copy constructor, setValue (calls other methods: setStrValue, setkeyColor,
setFrequency), setLength (calls setStrLength), setFrequency (should be double value-
cast)setkeyColor, getValue, getlength, getkeyColor, getFrequency, toString.
NoteClientDemoClass -Instantiate two Note objects using the overloaded constructor and
two Note objects using the default constructor.
A sample output for 1 Note object might appear like:
F#
Length: Eighth note
Value: -3
Black key (sharp)
369.995672 Hz

Transcribed Image Text:2.
Specify, design, and implement a "Note" class that can be used to hold
information about a musical note. A programmer should be able to set and retrieve
the length of the note and the value of the note.
The length of a note may be a sixteenth note, eighth note, quarter note, half note,
or whole note.
A value is specified by indicating how far the note lies above or below the "A" note
that orchestras use in tuning. In counting "how far," you should include both the
white and black notes on a piano.
For example, the note (value) numbers for the octave beginning at middle C are
shown as integers here:
-8 -6
-3 -1 1
田田
CD
F GA
DD Eb
GE At Bb
CDEFGAB
-9 -7 -5 -4 -2 o 2
Write a complete Java program.
The default constructor should set a note to a middle C quarter note.
Include methods to set a note to a specified length and value.
Write methods to retrieve information about a note, including methods to
tell you:
a) The letter of the note (A, B, C, ..., 6)
b) Whether the note is a natural (white key) or a sharp (black key) on the
piano
c) The frequency of a note in hertz.
In order to calculate the frequency, use the formula: 440 * 212, where n is
the note number.
Expert Solution

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

Knowledge Booster
Similar questions
- I am having so much difficulty coding this program. It would mean so much if I could have a screenshot of the full working code from Java. Thank you so much and take care!arrow_forwardPlease help me with the following below using java. Instructions is in the image below. Please show me the image of the two fractals you chose from the image below.arrow_forwardPlease help me with this using java. create a trivia game menu. Include the following: 1. Background (using fractals and recursion) (I would like a black brick wall as as the fractal for the background of the game menu 2. include the three clickable buttons ( play, settings, and instructions) 3. Include a title (Quiz time) (Image show below)arrow_forward
- please do both Questions.arrow_forwardWriting a Modular Program in Java Summary In this lab, you add the input and output statements to a partially completed Java program. When completed, the user should be able to enter a year, a month, and a day to determine if the date is valid. Valid years are those that are greater than 0, valid months include the values 1 through 12, and valid days include the values 1 through 31. Instructions Notice that variables have been declared for you. Write the simulated housekeeping() method that contains input statements to retrieve a year, a month, and a day from the user. Add statements to the simulated housekeeping()method that convert the String representation of the year, month, and day to ints. Include the output statements in the simulated endOfJob()method. The format of the output is as follows:month/day/year is a valid date. or month/day/year is an invalid date. Execute the program entering the following date: month = 5, day = 32, year =2014Observe the output of this…arrow_forwardHello! I am having trouble trying to write out the code that is supposed to begin by creating the "framework" of my Yahtzee Java program and I am just not sure on how to go about it. There are instructions (//***) at the very end of the code on what I have to write out, but that is where I am having trouble. Can you also write the comments that explains the "why" and "how" for each code as well? Thanks and I appreciate it. Here is what I have so far: public class YahtzeeP1 { final static int SCORE_NO_VALUE = -1; static int aces = SCORE_NO_VALUE; static int twos = SCORE_NO_VALUE; static int threes = SCORE_NO_VALUE; static int fours = SCORE_NO_VALUE; static int fives = SCORE_NO_VALUE; static int sixes = SCORE_NO_VALUE; static int threeKind = SCORE_NO_VALUE; static int fourKind = SCORE_NO_VALUE; static int fullHouse = SCORE_NO_VALUE; static int smallStraight = SCORE_NO_VALUE; static int largeStraight =…arrow_forward
- Please code in java and follow the instructions as it is.. Dont use very advanced methods. Refer the images provided for question scope and input outputarrow_forwardMake a Java electronic voting program. There should be 4 total parties(people you can vote for) use object-oriented code and output your final result to a text file. Some things to consider: Well implemented variables, data structures, well-running codearrow_forwardThe percentage is tell you how much the questions is worth. This is not graded!!! The language is Javaarrow_forward
- A syntax error occurs when a. the Java compiler can’t be located b. bytecode can’t be interpreted properly c. there’s a syntax error in a Java statement d. the class doesn’t contain a main() methodarrow_forwardThis assignment will help you to get started with NetBeans and using Java compiler: To begin, put a block comment at the beginning of your Java file (and every Java source file in the future) with the assignment number, assignment title, program author [your name], and the date it's due. Next, similar to the programs presented in the first chapter of the textbook, use System.out object to display the following information: Your first name The name of the operating system you are using The name of your project (or simply the folder name if not using the IDE) The name of the class that contains the main() method in your source file. Note: Your program should print each of the above items on a separate output line. "The name of the class that contains the main() method in your source file.public class MyClass { public static void main(String[]) { System.out.println( "Hi" ); }}arrow_forwardUsing p5* JavaScript on "openprocessing" websitearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY