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...
-
Five samples of a ferrous-type substance are to be used to determine if there is a difference between a laboratory chemical analysis and an X-ray fluorescence analysis of the iron content. Each...
-
Consider the conditions of Example 6.4. A laminar boundary layer can be tripped to a turbulent condition at \(x=x_{r}\) by roughening the surface of the plate at \(x_{r}\). Calculate the minimum and...
-
a. Create a FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating, and the date. The class includes methods to get each field. In addition,...
-
Pro, Inc. has just paid a dividend of $0.55 per share. The dividends are expected to grow at an annual rate of 5 percent indefinitely. What is the stock price today if the required return is 12.5...
-
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...
-
Mark each statement True or False (T/F). Justify each answer. (T/F) A vector b is a linear combination of the columns of a matrix A if and only if the equation Ax = b has at least one solution.
-
Kelly Company had cash receipts from customers in 2015 of 142,000. Cash payments for operating expenses were 97,000. Kelly has determined that at January 1, accounts receivable was 13,000, and...
-
What is the role of the Federal Deposit Insurance Corporation?
-
Accounting, Analysis, and Principles William Murray achieved one of his life-long dreams by opening his own business, The Caddie Shack Driving Range, on May 1, 2015. He invested $20,000 of his own...
-
The adjusted trial balance of Faulk Company shows the following data pertaining to sales at the end of its fiscal year, October 31, 2015: Sales Revenue 800,000; Delivery Expense 12,000; Sales Returns...
-
Which regulator charters national banks?
-
In our experience, change management planning often receives less attention than conversion planning. Why do you think this happens?
-
On January 1, 2017, McIlroy, Inc., acquired a 60 percent interest in the common stock of Stinson, Inc., for $340,200. Stinson's book value on that date consisted of common stock of $100,000 and...
-
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...
-
An annuity provides for 10 annual payments. The first payment of 1,000 is made immediately and the remaining payments increase by 6% per year. Interest is calculated at 5% per year. Calculate the...
-
We already know that as a general rule, around 11.0% of all patients visiting a certain family doctor's office complaining of a sore throat have a bacterial strep infection. If we randomly select a...
-
Your plant has fixed costs of $400,000 this year. If they increase by $20,000 every year for the next 10 years, what is the EUAC for the ten- year period? Assume the interest rate is 10%.
Study smarter with the SolutionInn App