In your Windows VM do the following:
1) Create a folder called pgm1
2) Move into the pgm1 folder
3) Using a Windows editor ONLY create a Java program named:
your last name + first letter of your first name + windowsPgm1.java
example robinsonMwindowsPgm1.java
In the above program, from the main method call a new method named:
processWindows passing your name, the numbers 3.99, 3.50, and 2
4) At the processWindows method, using System.out.printf display the accepted data, in two
rows.
On the first row display the first data field, followed by the second and third field
using 6 spaces for the interger part and 5 spaces for the decimal part of the number,
followed by the fourth field using 6 spaces.
On the second row display the label: Average GPA, followed by the result of the computation
of field 2 plus field 3 divided by field 4, using 6 integer spaces and 2 decimal spaces.
1. md pgm1
2. cd pgm1
3. Type " copy con filename " (filename=your last name + first letter of your first name + windowsPgm1.java)
4. Paste this code ( Change class name same as your file name without .java)
public class Myclass{ /// Replace"Myclass" with your last name + first letter of your first name + windowsPgm1
public static void processWindows (String name,double
x,double y,int z)
{
double avg=(x+y)/z;
String
avgStr[]=Double.toString(avg).split("\\.");
String label="Average GPA";
String
str1[]=Double.toString(x).split("\\.");
String
str2[]=Double.toString(y).split("\\.");
System.out.printf("%s %6s %5s %6s
%5s %6s %n",name,str1[0],str1[1],str2[0],str2[1],z);
System.out.printf("%s %6s %2s
%n",label,avgStr[0],avgStr[1]);
}
public static void main(String[] args) {
processWindows("your name",3.99,
3.50, 2 );
}
}
5. Press "ctrl + z" and Enter, it will save
In your Windows VM do the following: 1) Create a folder called pgm1 2) Move into...
- Create a folder called pgm1 - In your folder pgm1, USING A WINDOWS EDITOR, create a java program named Your lastName, firstLetterOfYourFirstName, pgm1W.java that will do the following: Start here - From your main method call a new method named: processArray - In the processArray method, create one 10x10 two dimensions array named twoDarray - In each index of your twoDarray, load the multiplication of its corresponding xy locations - Using the printf java command display, in a perfect...
If necessary, create a new project named Intermediate23 Project and save it in the Cpp8\Chap12 folder. Also create a new source file named Intermediate23.cpp. Declare a seven-row, two-column int array named temperatures. The program should prompt the user to enter the highest and lowest temperatures for seven days. Store the highest temperatures in the first column in the array. Store the lowest temperatures in the second column. The program should display the average high temperature and the average temperature. Display...
CIST 2371 Introduction to Java Unit 04 Lab Due Date: ________ Create a folder called Unit04 and put all your source files in this folder. You will create a UML diagram and two Java class files and that implements the classes in the UML diagram. Diagram Create a UML diagram that shows an Account class and an AccountTester class. The Account class holds the following data as Strings: account Number, type of account, card number and expire date. Include getter...
Sharing and Securing a Folder (using 2 VMs) Using two computers networked together, do the following to practice sharing and securing folders using Windows: Create a user account named User1 on Computer 1. In the My Documents folder for that account, create a folder named Folder1. Create a text file named File1 in the folder. Edit the file and add the text Golden Egg. On Computer 2, create a user account named User2. Try to read the Golden Egg text...
Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file, "insert-user-form.php", with a form that has the following fields: - First Name (text) - Last Name (text) - Email (text) - Password (text) - Submit button Create another PHP file, "insert-exercise-form.php" with a form that has the following fields: - Exercise Name (text) - Description (text) - Demonstration Image (file) - Submit button Create another PHP file, "login-user-form.php" with a form that has the...
a) In Atom, create a new program file named greetByfullName.jsin your pl folder. b) Write a function named greetByfullName that accepts two strings (firstName and lastName), and returns a cheery greeting. c) Test the function by prompting the user to enter their first name, and storing the name in a variable, and then prompting the user for their last name, and storing it in a second variable. This page says Enter your first name Susan Cancel OK This page says...
Exercise: (2) Create a class called Dog containing two Strings: name and says. In main(), create two dog objects with names “spot” (who says, “Ruff!”) and “scruffy” (who says, “Wurf!”). Then display their names and what they say. Be sure to use setter and getter methods to assign(set) and retrieve(get) values for both Strings name and says. Your Task: Create the program using Netbeans and easyUML (i.e: Open a project in NetBeans then create the classes, attributes, and methods in...
Boot into your Linux partition (or open Linux in a VirtualBox VM). You will create a new directory in your home directory called csci2020u/lab02. We’ll add this folder to the Git repositories. Use the following steps to complete this lab: 1. Change into the csci2020u directory 2. Make a new directory, called lab02 3. Add the lab02 directory to Git 4. In the lab02 directory, create the directory structure used by Gradle (the files will be initially empty, you can...
need help with this assignment, please. Part 1 - Java program named MemoryCalculator In your Ubuntu VM (virtual machine), using terminal mode ONLY, do the following: Create the folder program2 In this folder place the text file located on my faculty website in Module 2 called RAMerrors (Do not rename this file, it has no extension.) It is down below. Ths is the file RAMErrors 3CDAEFFAD ABCDEFABC 7A0EDF301 1A00D0000 Each record in this file represents the location of an error...
Create a java project with the name Assignment3YourLastName in the folder COMP3110AssignmentsYourLastName Part-1 (use a nested-if-else statement) Add a static method with the name gradeLetter. This method will ask the user to enter an integer score and display the grade letter based on the rules: Score range Grade letter 90—100 A 80—89 B 70—79 C 60—69 D 0—59 F Part-2 (use a while statement) Add a static method with the name CalculateGrade. This method will ask the user to enter...