Creating Enumerations In this section, you create two enumerations that hold colors and car model types. You will use them as field types in a Car class and write a demonstration program that shows how the enumerations are used.
1. Open a new file in your text editor, and type the following Color enumeration: enum Color {BLACK, BLUE, GREEN, RED, WHITE, YELLOW};
2. Save the file as Color.java.
3. Open a new file in your text editor, and create the following Model enumeration: enum Model {SEDAN, CONVERTIBLE, MINIVAN};
4. Save the file as Model.java. Next, open a new file in your text editor, and start to define a Car class that holds three fields: a year, a model, and a color.
public class Car {
private int year;
private Model model;
private Color color;
5. Add a constructor for the Car class that accepts parameters that hold the values for year, model, and color as follows:
public Car(int yr, Model m, Color c) {
year = yr;
model = m;
color = c;
}
6. Add a display() method that displays a Car object’s data, then add a closing curly brace for the class.
public void display() {
System.out.println("Car is a " + year + " " + color + " " + model);
}
}
7. Save the file as Car.java.
8. Open a new file in your text editor, and write a short demonstration program that instantiates two Car objects and assigns values to them using enumeration values for the models and colors.
public class CarDemo {
public static void main(String[] args) {
Car firstCar = new Car(2014, Model.MINIVAN, Color.BLUE);
Car secondcar = new Car(2017, Model.CONVERTIBLE, Color.RED);
firstCar.display();
secondcar.display();
}
}
9. Save the file as CarDemo.java, and then compile and execute it.
the output should be something like
"Car is a 2014 BLUE MINIVAN
Car is a 2017 RED CONVERTIBLE"
in Java
In: Computer Science
Questions:
In: Chemistry
Frances Newberry is the payroll accountant for Pack-It Services of Jackson, Arizona. The employees of Pack-it Services are paid semimonthly. An employee, Glen Riley, comes to her on November 10 and requests a pay advance of $750, which he will pay back in equal parts on the November 15 and December 15 paychecks. Glen is married with eight withholding allowances and is paid $50,000 per year. He contributes 3% of his pay to a 401(k) and has $25 per paycheck deducted for a Section 125 plan. Compute his net pay on his November 15 paycheck. The state income tax rate is 4%. Use the Wage Bracket Method Tables for Income Tax Withholding in
What is net pay?
In: Accounting
Design Activity #1—Project Proposal: In the designated project activity Word file, please create a written report (single-spaced, minimum of 600 additional words, small paragraphs) that describes a new proposed product for a B2C or B2B app. Your report should include the following sections: Title of your project, Author name & date, Description of the intended product (the intended look and feel of the product (via a simple sketch), and how it will function for the user), Intended delivery platform (PC, smart phone, etc.), Description of the intended user audience, Rationale for the product (what market need is being addressed), How you might go about designing your product, How you might go about developing your product. Please be sure to include sub-headings (underlined) and a line space between each section of your report.
In: Computer Science
1. You have been mandated to come up with an IT Governance
Strategy
Document for your organization. Detail how you would use 3 IT
Governance Frameworks to come up with your IT Governance
Strategy,
tailor made for your organization. Please provide your answer in
the
form of a simplified project document.
In: Computer Science
Explain the difference deemed appropriate for government intervention in addressing the state of the economy between Keynesian and Classical theorists. Do they have a sharply different perspective on the role of the government and if so what are the positions of each group regarding using government intervention to affect the state of the economy.
Were the actions taken thus far by the federal government to address the dire impact of Covid19 on the state of the economy more Keynesian or Classical in principle? What is your personal opinion as to the actions that have been, and will be, taken by the federal government to address the state of the economy?
In: Economics
Describe a time when you had to make a difficult decision in your life (personal, school, work, etc). Describe how you made that decision. Please use specific detail in your response to ensure you thinking is clear. Your response should be approximately 200 words.
In: Psychology
18a. Define the following:
Homeostasis
Set point.
20b. State the mechanism of optimization using the terms stimulus, receptor, control center, effector, and response in your answer.
30f. State the function of goblet cells and whether they are endocrine or exocrine glands.
31b. Explain why the answer in 31a makes epithelial tissue structurally ideal for creating barriers.
31c. State the name of the extracellular matrix of epithelial tissue.
31d. State the function of 31c.
31e. State what forms 31c.
32a. Define the location of the apical, lateral, and basal portions of epithelial cells.
32b. State within which portion of 3a you would find cilia or microvilli.
32c. State the difference between cilia and microvilli in terms of function.
32d. State on which portion of 3a you would find cell-to-cell junctions be located.
32e. State which portion of 3a touches the basement membrane.
34a. Define regeneration/renewal and explain the functional significance of renewal to epithelial tissue.
35a. Explain the difference between simple and stratified epithelium in terms of structure and function.
35b. Explain the difference between simple squamous and simple cuboidal/columnar epithelium in terms of structure and function.
36a. Explain the difference between keratinized versus non-keratinized stratified squamous in terms of structure and function.
In: Anatomy and Physiology
what is the theory (general principles) of KVL and KCL? please explain, when its applicable, consist of etc please write neatly preferably typed and go into detail please.
also what is a voltage divider?
In: Electrical Engineering
A) Why US is having an import quota of sugar and what is its impact on US domestic production?
B) What is the impact of an import quota on the sugar price in US and why consumers are not opposing this?
Explain in detail.
In: Economics