Hit The Order Button To Order A **Custom Paper**

>> CLICK HERE TO ORDER 100% ORIGINAL PAPERS FROM AustralianExpertWriters.com <<

15 Oct
2020

Look at the following partial class definition, and then respond to the questions that…

Category:ACADEMICIAN

SOLUTION AT Australian Expert Writers

Look at the following partial class definition, and then respond to the questions that follow it:public class Book { private String title; private String author; private String publisher; private int copiesSold; }a. write constructor for this class. The constructor should accept an argument for each of the fields. b. write accessor and mutator methods for each field.
(Population projection) The US Census Bureau projects population based on the following assumptions: One birth every 7 seconds One death
(Population projection) The US Census Bureau projects population based on the following assumptions: One birth every 7 seconds One death every 13 seconds One new immigrant every 45 seconds Write a program to display the population for each of the next five years. Assume the current population is 312032486 and one year has 365 days. Hint: in Python, you can use integer division operator // to perform division. The result is an integer. For example, 5 // 4 is 1 (not 1.25) and 10 // 4 is 2 (not 2.5).
Using the nano text editor, open a new file for editing (a) Put your name followed by the name of
Using the nano text editor, open a new file for editing (a) Put your name followed by the name of anyone who helped you in a comment at the beginning of the file. (b) Write the C code that includes the header file iostream. (c) Write the C code that allows you to use cin, cout, and endl without the prefix std::(d) Write the C code that declares the following variables: num1, num2, num3, and average of type int. (one declaration per line, please) (e) Write the C code that stores 255 into num1, 7 into num2, and -136 into num3. (f) Write the C code that stores the average of num1, num2, and num3 into average. Week 03 4 CS 135: Lab 01 (g) Write the C code that outputs the values of num1, num2, num3, and average
Please help me write Adress class , THAT CONTAINS THE FOLLOWINGData members:2. streetNum3. city4. zipCodeMethods: 1. street1. Default constructor2. Constructor
Please help me write Adress class , THAT CONTAINS THE FOLLOWINGData members:2. streetNum3. city4. zipCodeMethods: 1. street1. Default constructor2. Constructor with all data members3. isStreetNumValid() // [0, 99999]4. isCityValid() // the city name can only contain letters, space, and -5. toTitleCase() // to convert every word in a string to title case, e.g.: New York6. isZipCodeValid() // should be LDLDLD, e.g.: H4L3X9 or h4l3x9 (L: letter, D: digit)7. equals(Address address) // compare with Address instead of Object8. toString() // follow the format below:(Street: 123, Abc Streat // street No., street name, street name camel caseCity: Xxxxx // camel case, use toCamelcase() in step 10ZipCode: A0A0A0 // all upper case)9. getter and setter // use isStreetNumValid() in setStreetNum(), isCityValid() and toTitleCase() in setCity(), isZipCodeValid() in setZipCode(), if the input is not valid, then the data member will not be modified.10. toCamelcase (String str) // bring a string to camel case: “Xxxx Xxxx Xxxx”)
Correct the errors where applicable. Execute the code with output. public ———- class VirusDisease { ————————— abstract void spread()——- abstract
Programming Assignment Writing ServiceCorrect the errors where applicable. Execute the code with output. public ———- class VirusDisease { ————————— abstract void spread()——- abstract void affect()——- abstract void prevents()——- abstract void ShowDisease()} ——– Measles implements ———{spread (){// implements your own method definition that tells how this disease is spread}affect(){// implements your own method definition that tells what is effect on our health}prevents(){// implements your own method definition that tells how can we be prevented from it }ShowDisease(){System.out.println(“You have measles for throat pain and sneezing “);}} ———- CoronoVirus implements ———{spread (){// implements your own method definition that tells how this disease is spread}affect(){// implements your own method definition that tells what is effect on our health}prevents(){// implements your own method definition that tells how can we be prevented from it.}ShowDisease(){System.out.println(“You have coronavirus for fever and low_breating “);}} Public class —-{————— main(String[] args) {//create object and call each method.//detection test, declare two null strings.String symptom= String symptom1= Enter a symptom fever or throat pain//take input a string in disease symptom from user through //Scanner class Enter a symptom low breathing or sneezing//take input a string in disease symptom from user through //Scanner class //check condition if someone has If (symptom==”” _____ Symptom1== “”){//call show disease method of corona virus class}else if(symptom==”” _____ Symptom1== “”){//call show disease method of measles}else(“its viral”) }}
create project for this course. • Select “New”->”Java Project” from the File menu. A dialog box should appear. • Enter
create project for this course. • Select “New”->”Java Project” from the File menu. A dialog box should appear. • Enter the Project name “CS1102”. • The default value should work for everything else. Click “Finish”. A pane on the left side of the Eclipse window should show a folder named “CS1102”. Now create the class for your Programming Assignment. • Select “New”->”Class” from the File menu. • Enter the Name “SuperPower” (no spaces). As Eck (2019) suggests in Section 2.6.6, ignore the warning that “the use of the default package is discouraged” (63). • Click “Finish”. The new file “SuperPower.java” should appear in the center pane for editing. It should have a class declaration for “SuperPower” with an empty definition block. Now give your class something to do! Add a “main” method, which will be run as your program. • Type in the following method definition and output statement inside the definition block of the class (between the first “{” and last “}”). public static void main(String[] args) { System.out.println(“SUPER POWERS TO THE RESCUE!”); } Notice how the editor automatically adds the closing “}” and provides automatic completion as you type the “System.out.println” call. This automatic completion can be distracting at first, but it is useful for experienced programmers. If you make mistakes in typing this method definition, you may see small warning icons to the left of the lines of code that have problems. For example, if you type “system” instead of “System”, a warning icon will appear left of that line. Move your mouse over the icon to see a message like “system cannot be resolved”. If you type the method definition correctly, no error icons should appear. Time to run your program! • Click the Run icon, a small green circle with a white triangle at the top right of the Eclipse window. A dialog box should appear asking if you want to save your resources (your Java code file). • Click the box next to “Always save resources before launching”. • Click “OK”. The IDE will now compile and run your program. The text “SUPER POWERS TO THE RESCUE!” should appear in a Console pane at the bottom of the Eclipse window. But Java was designed for graphical user interfaces (GUIs) more than text output. Change your program to use some of the built-in graphics features of Java. • Add the following line at the top of your code, before “public class SuperPower”. import javax.swing.JOptionPane; This line gives your program access to some built-in dialog boxes. • Replace the “System.out.println” call with the following. JOptionPane.showMessageDialog(null,”SUPER POWERS TO THE RESCUE!”); This method call will generate a dialog box. The first argument is used to associate the dialog box with a particular window. Your program has no other window, so you use “null”, which means, well, “nothing”. The second argument is the String that you want the dialog box to display. Make sure you have no warning icons next to any lines of code. • Click the Run icon. A dialog box should appear with the message “SUPER POWERS TO THE RESCUE!” • Click “OK”. The dialog box should disappear, ending your program. Now make the program more interactive. • Add the following String declaration and initialization just before the existing call to “JOptionPane.showMessageDialog”, inside the definition of the main method. String power = JOptionPane.showInputDialog(“What is your super power?”); This assignment statement uses the method “showInputDialog”, which is a function that returns a string input by the user. The argument to “showInputDialog” appears in the input dialog prompting for the input. The String variable “power” is assigned to refer to the String input by the user. • Change the call to “showMessageDialog” to use the power input by the user. JOptionPane.showMessageDialog(null,power ” TO THE RESCUE!”); The second argument to “showMessageDialog” is now a String expression. It uses the String operator ” ” to concatenate the contents of the variable “power” with the String literal ” TO THE RESCUE!”. Make sure you have no warning icons next to any lines of code. • Click the Run icon. A new Input dialog should appear asking for your super power. • Enter the text and click “OK”. The Message dialog should celebrate your super power. • Click “OK”. The Message dialog should disapper, ending your program. As a final feature, change the user’s input so it is all capital letters. Use the “toUpperCase” method that is described in Section 2.3.3 of Eck (2019). Add the following line after the initialization of “power” and before the “showMessageDialog” call that uses it. power = power.toUpperCase(); The method “toUpperCase” is a function that returns an all-upper-case translation of the String “power”. The assignment with “=” then resets “power” to refer to this modified String instead of the original. • Click the Run icon. • Enter a power with lower-case letters. • Confirm that the resulting message is all upper case. Congratulations! Now you are ready to submit your assignment. First look up how to take screen shots on your device. Then run your program again. • Click the Run icon. • Enter a power with low-case letters. • Take a screen shot of this Input dialog box before clicking “OK”. • Click “OK”. • Take a screen shot of the Message dialog. Upload the following for your Programming Assignment submission. • SuperPower.java • Screen shot showing the Input dialog with some lower-case input. • Screen shot showing the Message dialog with all upper-case output.
The second programming projectwriting one programAutomobileA constructorsalesTaxtoStringAutomobileElectricA involves that computes the sales tax for a collection of automobiles of different
The second programming projectwriting one programAutomobileA constructorsalesTaxtoStringAutomobileElectricA involves that computes the sales tax for a collection of automobiles of different types and the total cost for each of those automobiles. This program consists of three classes and a Program Core in Java.The first class is the class, which contains the automobile’s Make and Model [one data element] and purchase price which are specified in whole US dollars – no cents. It should have three methods: that allows the Make/Model and purchase price to be initialized.A method named that returns the base sales tax computed as 5% of the sales price.A method that returns a string containing the Make/Model of the automobile, the sales price, the adjusted sales tax, auto type factor [“Other”], and total cost of automobile appropriately labeled.The class has two subclasses. The first subclass is . It has an additional instance variable that contains its weight in pounds stored as an integer. It should have the same three methods:constructor that allows the automobile’s Make/Model, purchase price, and weight to be initialized.An overridden method salesTax that returns the total sales tax. The sales tax for an Electric Automobile consists of the base sales tax of 5% that applies to all automobiles minus a discount. If the weight of the automobile is 3,000 pounds or less the discount is $200 off the sales tax; otherwise the discount is $150 off the sales tax. The discount is never more than the total sales tax. [Sales tax $75, the discount is only $75.]An overridden toString method that returns a string containing the Make/Model of the automobile, the sales price, adjusted sales tax, auto type factor [Electric: weight value displayed], weight, and the total cost of automobile appropriately labeled.The second subclass is Hybrid. It has an additional instance variable that contains the number of miles per gallon stored as an integer. It should have the same three methods:A constructor that allows the automobile’s Make/Model, purchase price, and miles per gallon to be initialized.An overridden method salesTax that returns the total sales tax. The sales tax for a Hybrid Automobile consists of the base sales tax of 5% minus a discount. If the miles per gallon is 40 mpg or less, the discount is $100 off the sales tax; otherwise there is an additional discount above the $100 of $2.00 for every mile per gallon more than 40 mpg. The discount is never more than the total sales tax. [Sales tax $75, the discount is only $75.]An overridden toString method that returns a string containing the Make/Model of the automobile, the sales price, adjusted sales tax, auto type factor [Hybrid: mpg value displayed], and the total cost of automobile appropriately labeled.No additional public methods should be included in any of the above three classes.Finally, a Program Core contains the main method. It should generate one of the GUI windows shown below in three versions:After entering the information about the Make/Model and its sales price, select the radio button under the Automobile Type. If another entry box displays because a radio button is clicked, enter the appropriate information. Once all the information is added to the Automobile Sales Tax Calculator Window, click the Compute Sales Tax button. The appropriate amount of sales tax displays in the TextField to its right. The default Automobile Type is Other so that radio button in the radio group should be selected. When Other Type is selected the Labels and TextFields for Hybrid and Electric are hidden. [Hints: [Component].setVisible(false).];[Component]. setEditable(false)]. When Hybrid Type is selected the Miles per Gallon Label and the its TextField display but are hidden if not selected. When Electric Type is selected the Weight in Pounds Label and its TextField display but are hidden if not selected. If non-integer values are entered in any of the TextFields that require integers, an error message should be displayed in a JOptionPane window referencing that specific Label and after clicking OK the cursor returns to the same TextField for another attempt at an appropriate entry.In addition, once all the information about the automobile is entered the object should be stored in an array of type Automobile. That array should contain at least five automobiles entries/records/rows. The array should contain the following fields: Make/Model, Sales Price, Sales Tax, Vehicle Type, Auto Type Factor [“Other,” MPG value, Weight value], Total Cost of Automobile.Clicking the Clear Fields button should clear all TextFields and hide the Labels and TextField for the Hybrid and Electric Types.Clicking the Display Report button should produce in the IDE Output Window the information about all the automobiles stored in the array at any given time of processing of the program – one display after the first process or five displays after the fifth auto is processed. An example of the report that should be displayed is shown below with three entries in an Automobile array:When the Exit button is clicked an appropriate message displays that the program is ending.
Create Java project called usernamePart4 in NetBeans. Write program that uses 4 threads to print out 4 sculpture titles (Donatello’s
Create Java project called usernamePart4 in NetBeans. Write program that uses 4 threads to print out 4 sculpture titles (Donatello’s Equestrian Monument of Gattamelata, The Terracotta Army, Michelangelo’s David, Maman) in the console, in parallel, 20 times each author. NOTE: you will not receive any marks if your program does not use threads.Use two different ways to create the threads: by using the Thread class, and by using the Runnable interfaceSet different priority to each thread (maximum, normal, minimum)Write the code to put the threads to sleep for 100 milliseconds each time a sculpture artist is printed to the consoleUse of thread pools:Create fixed thread pool that returns a thread pool with a maximum of 3 threadsWrite the code to shut down the fixed thread pool after current tasks are complete also return TRUE when the shutdown is completeCreate cached thread pool that returns a thread pool that creates new threads as requiredWrite the code to shut down the cached thread pool immediately and return TRUE if alltasks in the cached thread pool have been terminatedAvoiding data corruptions• Assume that there is a possibility of data corruption in this program (data corruption may not happen in this program). Write the necessary code to your methods to allow only one thread can execute the code block at one time so that data corruption is prevented. In order to do so, use both thread Synchronisation and explicit lock object techniques separately.

Order from Australian Expert Writers
Best Australian Academic Writers

QUALITY: 100% ORIGINAL PAPERNO PLAGIARISM – CUSTOM PAPER

READ ALSO  ITC597 – Digital Forensics