Answered step by step
Verified Expert Solution
Link Copied!

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 =23; // Later we would input this but today we simulate that
int doubleNum =0;
doubleNum = myFavNum *2;
System.out.println(The 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 1(3 pts):
Project name: Lab_04_01_SalesTax
Given the price of a purchase the program computes and outputs a 5% 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 1(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 2(3 pts):
Project: Lab_04_02_YearlyMaintenanceCost
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 2:
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 3(4 pts):
Project: Lab_04_03_MonthyCCBalance
A program that starts with a credit card balance of $5000 and then calculates the interest at a rate of 17%. 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 3:
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 4(2 pts): (Extra Credit)
Project: Lab_04_04_EvenOdd
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 =2;
// program will then determine that since 2 mod 2 is 0 that numToExamine is Even.
)
Screenshots or output copy here for Task 4:
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

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

Step: 3

blur-text-image

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions