Given this Computer design program: Use the following trace setup to trace the Computer program. Note that
Question:
Given this Computer design program:
Use the following trace setup to trace the Computer program. Note that we have used abbreviations to keep the trace setup’s width as small as possible. Don’t forget to specify default and initial values, even if they don’t affect the final result.
Transcribed Image Text:
1 2 3 *Dean & Dean 4 5 *This exercises the Computer class. ***** 6 7 8 13 14 15 16 17 18 19 1 2 9 ( 10 11 12 3 4 5 6 7 8 9 /********* * Computer Driver.java * 19 20 public class Computer Driver 21 22 23 24 public static void main(String[] args) ( Computer my Pc new Computer (); myPc.assignProcessor (); my Pc.assignRamSize(): my Pc.assignDiskSize(); my Pc.calculateCost (); my Pc.printSpecification(); 3 // end main / end class Computer Driver /********** * Computer.java Dean & Dean. * 31 32 10 public class Computer 11 ( * This class collects specifications for a Computer. ***** 12 private String processor: 13 14 15 16 17 18 import java.ut11.Scanner: - private long ramSize (long) 1000000000.0; private long diskSize: private double cost; //****** public void assign Processor () ( Scanner stdIn - new Scanner (System.in); this.processor = stdIn.nextLine(); } // end assignProcessor 25 26 27 public void assignRamSize() 28 ( 29 30 this.ramSize = (long) 3000000000.0; } // end assign RamSize //***** 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 public void printSpecification () 60 ( 61 62 63 64 65 66 // end class Computer public void assignDiskSize() { Scanner stdIn= new Scanner (System.in); long diskSize; diskSize = stdIn.nextLong (); } // end assignDiskSize //************** public void calculate Cost() ( this.cost = this.ramSize/ 20000000.0 + this.diskSize / 200000000.0; if (this.processor.equals("Intel")). ( this.cost += 200; } else ( this.cost + 150; } } // end calculate Cost //******** **/ **************************** } // end printSpecification *********** ********* System.out.println("Processor = "+ this.processor); System.out.println("RAM = " + this.ramSize); System.out.println("Hard disk size = " + this.diskSize); System.out.println("Cost = $" + this.cost);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
Java import javautilScanner public class Computer ...View the full answer
Answered By
Nicole omwa
Being a highly skilled tutor with at least 5 years of tutoring experience in different areas, I learned how to help diverse learners in writing drafts of research papers, actual research papers and locate credible sources. My assurance is built upon my varied knowledge of a variety of subjects. Furthermore, my involvement and interaction with numerous learners of all levels has allowed me to understand my clients' specific demands. Ultimately, this has aided me in being a better coach to learners to better their grades. Essentially, my responsibilities as a tutor would include:
Teaching abilities that assist pupils in enhancing their academic performance
Personal interaction with learners to make them understand abstract concepts
Inducing new skills and knowledge into their academic journeys
Fostering individual reflection, and independent and critical thinking
Editing and proofreading
Because I am constantly available to respond to your queries, you may decide to rely on me whenever you require my assistance. As an assurance, my knowledge skills and expertise enable me to quickly assist learners with different academic challenges in areas with difficulty in understanding. Ultimately, I believe that I am a reliable tutor concerned about my learner's needs and interests to solve their urgent projects. My purpose is always to assist them in comprehending abstract schoolwork and mastering their subjects. I also understand that plagiarism is a severe offense and has serious ramifications. Owing to this, I always make it a point to educate learners on the numerous strategies to have uniquely unique solutions. I am familiar with the following formatting styles:
MLA
APA
Harvard
Chicago
IEEE
Communication is always the key in every interaction with my learners. Hence, I provide timely communication about the progress of assigned projects. As a result, I make sure that I maintain excellent communication with all of my clients. I can engage with all of my customers more effectively, assisting them with their unique academic demands. Furthermore, I attempt to establish a solid working relationship with my leaners I have exceptional abilities in the below areas;
Sociology
History
Nursing
Psychology
Literature
Health and Medicine
Chemistry
Biology
Management
Marketing
Business
Earth Science
Environmental Studies
Education
Being a teacher who aces in diverse fields, I provide various academic tasks, which include;
Academic Reports
Movie Reviews
Literature Reviews
Annotated bibliographies
Lab reports
Discussion posts
Dissertations
Case study analyses
Research proposals
Argumentative Essays
I guarantee you high-quality Papers!!!!!
5.00+
17+ Reviews
32+ Question Solved
Related Book For
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean
Question Posted:
Students also viewed these Computer science questions
-
Construct UML class diagrams for the Computer and ComputerDriver classes in Exercise 6. Exercise 6 Given this Computer design program: Use the following trace setup to trace the Computer program....
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A ball is dropped from a high rise platform at t = 0 starting from rest. After 6 seconds another ball is thrown downwards from the same platform with a speed v. The two balls meet at t = 18s. What is...
-
Limonene, a major component of lemon oil, has the formula C10H16. (a) On reaction with excess H2 in the presence of Pt, limonene produces C10H20. What information does this provide about the...
-
The completed financial statement columns of the worksheet for Fleming Company are shown below. Instructions (a) Prepare an income statement, an owners equity statement, and a classified balance...
-
Deanna Nardelli started her own consulting firm, Nardelli Consulting, on May 1, 2020. The trial balance at May 31 is as follows. Nardelli Consulting Trial Balance May 31, 2020 In addition to those...
-
On April 16, 2014, ColorCo purchased a put option for $800 on Choco common stock. The put option gives ColorCo the option to sell 5,000 shares of Choco at a strike price of $25 per share for a period...
-
what are Bond Capital (Loan Capital) and Share Capital ? and their differences ?
-
What does UML mean? That is, what words do its initials represent?
-
Suppose you own some land and would like to build three houses on it. a) Implement a House class with instance variables floorArea (a double) and salePrice (another double) and these methods: i. A...
-
A bowl contains water that evaporates at a rate proportional to the surface area of water exposed to the air (Figure 19). Let A(h) be the cross-sectional area of the bowl at height h. (a) Explain why...
-
Link two articles from a trade journal in your field and discuss them in a short paper...
-
Evaluate vendors for supplying differentiated or specialized widgets. Review the "Supplier Scorecard Data" document and answer the questions below. 1. Discuss which supplier you will select,...
-
3. By keeping the leading term in the relativistic correction, the kinetic energy operator T of a relativistic electron in one dimension can be written as p 3p4 + 2m 8m3c2 where c is the speed of...
-
CHOOSE CORRECT OPTION How might inadequate training impact Thandiwe's ability to address classroom challenges? a. Develops effective teaching strategies b. Enhances problem solving skills and creates...
-
A 3.5-kg cannon on wheels is loaded with a 0.0527-kg ball. The cannon and ball are initially moving forward with a speed of 1.27 m/s. The cannon is ignited and launches a 0.0527-kg ball forward with...
-
The total accumulated costs C(i)and revenues R(t)(in thousands of dollars), respectively, for a coal mine satisfy C'(t) = 3 and R' (t) = 15e-01t where t is the number of years that the mine has been...
-
on 8 For the following set of lengths 130, 170, 160, 160, 150, 190 Third quartile is: et red d out of Select one: O a. 160 a question O b. 145 O c. 175 O d. 180
-
The bell-shaped histogram for the heights of three-year-old red pine seedlings on page 232 is consistent with the assumption of a normal distribution having mean = 280 and sd = 58 millimeters. Let X...
-
a. Determine the energy, in eV, of a photon with a 550 nm wavelength. b. Determine the wavelength of a 7.5 keV x-ray photon.
-
In an article entitled "A Strategy for Big Bucks," Charles Dickey discusses studies of the habits of white-tailed deer that indicate that they live and feed within very limited ranges-approximately...
-
Present Value Computations Using the present value tables, solve the following. ( Click here to access the PV and FV tables to use with this problem. ) Round your answers to two decimal places....
-
A company provided the following data: Sales $887,000 Variable costs $546,800 Fixed costs $310,000 Expected production and sales in units 36,000 What is the break-even point in sales dollars? Please...
-
How to solve them..equation and explain ..please.. 1. Selected information from the companys financial records is presented below Equipment, December 31, 2013 $300,000 Equipment, December 31, 2014...
Study smarter with the SolutionInn App