Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is to develop your first object-oriented program. You will utilize classes, common data types, and control structures. Following are the instructions. Step 1:

This assignment is to develop your first object-oriented program. You will utilize classes, common data types, and control structures. Following are the instructions. Step 1: Define a Computer class that can be used to describe your computer. The class must have at least two attributes. One variable must be an integer data type and the other must be a String data type. At least one method should be defined in your class. Step 1a: Prepare a class diagram to illustrate your Computer class. Copy to a Word document. Step 1b: Prepare the source code that implements your Computer class. Give your source code a filename of Computer.java. Step 2: Prepare a program that utilizes your Computer class. The requirements for the program include prompting the user for input, making a calculation, and printing out the results. Begin by creating your pseudocode for this program. Once you have your pseudocode, copy it into your Word document. You can now begin writing your program. Your program should prompt the user for information about their existing computer followed by information about a future, more desirable computer. This means that your program will create two instances of Computer class, the first instance reflects the existing Computer, and the second instance reflects the future Computer. Use the Scanner class for obtaining input from the user keyboard. The program must calculate the difference (improvement) between the existing and future Computer class variables of integer data type. For example, Computer class may contain an integer variable named memory. The value of the memory variable for the existing Computer instance may be 8, while the value for this variable in the future Computer instance may be 10. Calculating the difference would indicate an improvement of 2. Print to the screen the values for the existing computer class and the desired computer class, along with the calculated improvement. Your assignment submittal should include your properly commented Java source code for your Computer class as well as for your program. The first step should be to plan your program. Prepare a Word document that shows your program plan description including class diagram and your pseudocode defining program logic. The second step should be to write the code based upon your planning document. Submit the Word design document, source code for Computer class and for your program. Include both .class files.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

Why must Sarah fully describe her invention in her application?

Answered: 1 week ago