Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part II: Now code each of these programs. Since we can t do java input yet, just set the input value as a literal value
Part II:
Now code each of these programs. Since we cant do java input yet, just set the input value as a literal value in your code. Ill leave it to you to choose the values. Be sure to use clear and meaningful variable names with appropriate types! Try to pick values that make it easy for you to visually confirm the results of your program outputs.
Here is an example:
We did an example where the user enters a number and the program doubles it Here is the code that I would put within the main class of my IntelliJ project:
int myFavNum ; Later we would input this but today we simulate that
int doubleNum ;
doubleNum myFavNum ;
System.out.printlnThe number myFavNum doubled is: doubleNum;
When you run the code, you will see the println statement with the variable names replaced with the actual values.
On with the lab:
Create a new IntelliJ Java Project for each of these programs using the specified names.
If your instructor directed you to use GitHub, create a GitHub project for each program as with the previous one. Be sure to commit and push you project when completed. Again, this first time, I recommend that you access your GitHub account with a web browser and confirm that you projects are created an updated.
Task pts:
Project name: LabSalesTax
Given the price of a purchase the program computes and outputs a sales tax. Be sure to use output statements that clearly display the price and the computed sales tax. No conditions here, the sales tax is always the same rate.
Screenshots or output copy here from Task Be sure to include a readable shot of your programs output for each of these tasks:
Dont forget to commit and push your project in GitHub if you were told to use it
Post the URL link for this repository here:
Task pts:
Project: LabYearlyMaintenanceCost
A program that uses home maintenance costs for each of the four seasons and returns the total yearly maintenance costs. Again, be clear in the output by echoing the values for the seasonal costs when you display the combined total.
Screenshots or output copy here for Task :
Dont forget to commit and push your project in GitHub if you were told to use it Post the URL link for this repository here:
Task pts:
Project: LabMonthyCCBalance
A program that starts with a credit card balance of $ and then calculates the interest at a rate of Assume the user does not make any payments. Display the interest due after one month and again after two months.
Screenshots or output copy here for Task :
Dont forget to commit and push your project in GitHub if you were told to use it Post the URL link for this repository here:
Task pts: Extra Credit
Project: LabEvenOdd
A program that takes a integer java int and uses the modulo function to indicate if the number is odd or even. Since we cant do input in java yet, just hard code the value for the input as a variable instantiation.
Instead of inputing the value which we cant do yet, set the value in the code.
int numToExamine ;
program will then determine that since mod is that numToExamine is Even.
Screenshots or output copy here for Task :
Dont forget to commit and push your project in GitHub if you were told to use it Post the URL link for this repository here:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started