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...

1 answer below »

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.

Answered Same DayJun 13, 2021

Answer To: This assignment is to develop your first object-oriented program. You will utilize classes, common...

Sonu answered on Jun 16 2021
140 Votes
Computer Class/Class Diagram.JPG
Computer Class/ComputerJavaSOurce-code/.classpath

    
    
    
Computer Class/ComputerJavaSOurce-code
/.project

     ComputerJava
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
            
            
        
    
    
         org.eclipse.jdt.core.javanature
    
Computer Class/ComputerJavaSOurce-code/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Computer Class/ComputerJavaSOurce-code/bin/com/java/computer/Computer.class
package com.java.computer;
public synchronized class Computer {
int memory;
String message;
public void Computer();
public int getMemory();
public void setMemory(int);
public String getMessage();
public void setMessage(String);
public static int getSystemCalculation(Computer, Computer);
}
Computer...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here