BUIS 305/INSS 505FALL 2020PAIRED PROGRAMMING PROJECTS LAB 1 - CODING SIMPLE PROGRAMS DUE BY 11:59PM ON MON 11/2/2020 SUBMIT YOUR COMPLETED LAB ASSIGNMENT ON BLACKBOARD, UNDER ASSIGNMENTS. SUBMIT THE...

1 answer below »
How soon Can this assignment be done


BUIS 305/INSS 505FALL 2020PAIRED PROGRAMMING PROJECTS LAB 1 - CODING SIMPLE PROGRAMS DUE BY 11:59PM ON MON 11/2/2020 SUBMIT YOUR COMPLETED LAB ASSIGNMENT ON BLACKBOARD, UNDER ASSIGNMENTS. SUBMIT THE REQUIRED 8 PROGRAMS AS JAVA FILES ONLY, NO TEXT DOCUMENTS WILL BE ACCEPTED. teams may submit 1 submission or both members may submit different programs. ANY CODE COPIED AND PASTED FROM ANOTHER SOURCE (NOT ORIGINALLY CODED BY YOU) IS UNACCEPTABLE AND WILL RESULT IN 0 FOR THE ASSIGNMENT. All programs MUST include the following comments at the top: //*********************************************** // PROGRAMMING LAB #: // PROBLEM #: // PROGRAM-NAME: //*********************************************** IF YOU ARE USING AN IDE ON YOUR COMPUTER, THE PROGRAMS WILL BE SAVED WITH THE CLASS NAME. FOR EXAMPLE, FirstJavaProgram.java. IF YOU ARE USING THE WEB-ENABLED IDE, IDEONE.COM, YOU WILL NOT BE ABLE TO SAVE IT WITH THE CLASS NAME. SAVE & RUN THE PROGRAMS, CHECK FOR ANY ERRORS. REVIEW THE LOGIC, MAKE SURE YOU UNDERSTAND THE CODE. PROBLEMS 1, 2, 3, 4 & 7: COPY AND PASTE OR TYPE THESE 5 JAVA PROGRAMS INTO AN IDE. USE THEM AS A REFERENCE TO COMPLETING THE OTHER PROGRAMS. PROBLEMS 5, 6, 8A, 8B, 9A, 9B, 9C & 9D: THESE PROGRAMS WILL BE CREATED BY YOU, YOU ARE ONLY SUBMITTING THESE 8 JAVA PROGRAMS. PROBLEM 1. SIMPLE PRINT STATEMENT. //*********************************************** // PROGRAMMING LAB #: 1 // PROBLEM #: 1 // PROGRAM-NAME: FirstJavaProgram //*********************************************** class FirstJavaProgram { public static void main(String[] args){ System.out.println("This is my first program in Java"); } } PROBLEM 2. SIMPLE PRINT STATEMENTS. class Hello { public static void main(String[] args) { System.out.println("Hello, world!"); System.out.println(); System.out.println("This program produces"); System.out.println("four lines of output"); } } PROBLEM 3. THE FOLLOWING PROGRAM USES MODULARIZATION, CALLS THE printHello() METHOD FROM THE MAIN METHOD. class MethodExample {     public static void main(String[] args) {         printHello();         printHello();             }     public static void printHello(){         System.out.println("Hello World!");         System.out.println("How are you today?");         System.out.println();     } } PROBLEM 4. THE FOLLOWING PROGRAM CONVERTS 10 GALLONS TO LITERS: class GallonConversion { public static void main(String[] args){ //declare variables as double data types, initialize variables to zero double gallons = 0.0; double litersConversion = 0.0; //initializing gallons to 10 gallons = 10.0; //arithmetic expression assigning result to liters litersConversion = gallons * 3.7854; //simple output System.out.println(litersConversion); } } PROBLEM 5. CHANGE THE ABOVE PROGRAM SO THAT gallons IS INITIALIZED TO 20. ADD A PRINT STATEMENT ABOVE THE PRINT STATEMENT IN THE CODE: System.out.println(“20 gallons converts to how many liters?”); SAVE THE PROGRAM AS GallonConversion20. PROBLEM 6. NOW CODE THE SAME PROGRAM with LITERS declared & INITIALIZED as a constant AND INITIALIZE gallons TO 25. ADD A PRINT STATEMENT ABOVE THE PRINT STATEMENT IN THE CODE: System.out.println(“25 gallons converts to how many liters?”); SAVE THE PROGRAM AS GallonConversion25. PROBLEM 7. The FOLLOWING program increases the value of the variablE myNumber by 10 and outputs the result. class AddTen { public static void main(String[] args){ //Declare variables as integers, initialize variables with values int myNumber = 95; int myAnswer = 0; //Do the calculation myAnswer = myNumber + 10; //Output the result System.out.println(myAnswer); } } PROBLEM 8. A. CHANGE PROBLEM 7 TO INCLUDE A SELECTION STRUCTURE, WHERE THE CALCULATION IS DONE IF mynumber is less than 100. B. change problem 8a, where the value of mynumber is 100. questions to consider: do you think the program will run? if so, what do you think the output will be? will there be any output? PROBLEM 9. BASED ON THE APPLICATIONS YOU WORKED ON IN CHAPTER 1 INDIVIDUAL ASSIGNMENT, WRITE PROGRAMS FOR THE FOLLOWING PROBLEMS: A. Write a program with a value for hours worked in a day as 8 hours. The program calculates the hours worked in a five-day week and the hours worked in a 252-day work year. The program outputs all the results – daily hours worked, weekly hours worked and yearly hours worked. B. Write a program with values for the current year and the user’s birth year as 1987. The program should output the age of the user this year. C. Write a program with values for hourly pay rate as $15.75 and hours worked as 55. The program should output the user’s gross pay. Include a selection structure to calculate gross pay if hours worked are more than 40. D. Based on the currency exchange problem, research current rates of monetary exchange. Write a program that converts a $50 dollar value to 2 other forms of international currency and displays the dollar value and both conversion results. If the dollar value is greater than $100, an error message prints. Do not use Euros and Yen. Test your program with dollar values that will do the conversion and with dollar values that will result in the error message.
Answered Same DayNov 03, 2021

Answer To: BUIS 305/INSS 505FALL 2020PAIRED PROGRAMMING PROJECTS LAB 1 - CODING SIMPLE PROGRAMS DUE BY...

Aditya answered on Nov 04 2021
140 Votes
Codes/AddTen8A.java
Codes/AddTen8A.java
//*********************************************** 
// PROGRAMMING LAB #: 8A
// PROBLEM #: 8A
// PROGRAM-NAME: Ad
dTen8A
//***********************************************
public class AddTen8A {
    public static void main(String[] args) {
        int myNumber = 95;
        int myAnswer = 0;
        if(myNumber < 100)
        {
            myAnswer = myNumber + 10;
        }
        System.out.println(myAnswer);
    }
}
Codes/AddTen8B.java
Codes/AddTen8B.java
//*********************************************** 
// PROGRAMMING LAB #: 8B
// PROBLEM #: 8B
// PROGRAM-NAME: AddTen8B
//***********************************************
public class AddTen8B {
    public static void main(String[] args) {
        int myNumber = 100;
        int myAnswer = 0;
        if(myNumber < 100)
        {
            myAnswer = myNumber + 10;
        }
        System.out.println(myAnswer);
    }
}
Codes/AgeCalculator9B.java
Codes/AgeCalculator9B.java
//*********************************************** 
// PROGRAMMING LAB #: 9B
// PROBLEM #: 9B
// PROGRAM-NAME: HoursWorked9A
//***********************************************
public class AgeCalculator9B {
    public static void main(String[] args) {
        int birthYear = 1987;
        int currentYear = 2020;
        int age =0;
        age = currentYear - birthYear;
        System.out.println("Age is ");
        System.out.println(age);
    }

}
Codes/CurrencyConvertor9D.java
Codes/CurrencyConvertor9D.java
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here