AI Programming
11.2K subscribers
594 photos
42 videos
245 files
568 links
An artificial intelligence free resource channel for students, professionals, and anyone who wants to learn how to solve problems.

ENGINEERING πŸŽ– PROGRAMMING πŸŽ– TIPS & HACKS

https://youtube.com/c/AIProgramming
CONTACT US ON: @alphadmin12
Download Telegram
Employee.java
1.9 KB
OOP Overview (Constructors)
β€”β€”β€”β€”β€”β€”β€”β€”β€”
In the following attached simple project java file called Employee we try to cover as much deep as possible about class, objects, functions, methods, assigning & initializing parameters, instantiate objects, accepting input from user and displaying (u can call it OOP overview buffae/α‰‘αŒ) but our focus is on the following:

⭕️ Parameterized Constructor
⭕️ Non-Parameterized Constructor
⭕️ Overriding Constructors
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming
@freecodecs
Have a LitπŸ”₯Practice Folks πŸ™ŒπŸ½
chrome_installer 74 @freecodecs.exe
53.2 MB
Ι’α΄α΄Ι’ΚŸα΄‡ α΄„ΚœΚ€α΄α΄α΄‡ ʙʀᴏᴑsᴇʀ Ιͺs α΄€Ι΄ α΄α΄˜α΄‡Ι΄ sα΄α΄œΚ€α΄„α΄‡ α΄˜Κ€α΄Ι’Κ€α΄€α΄ κœ°α΄Κ€ ᴀᴄᴄᴇssΙͺΙ΄Ι’ α΄›Κœα΄‡ α΄‘α΄Κ€ΚŸα΄… α΄‘Ιͺᴅᴇ ᴑᴇʙ α΄€Ι΄α΄… Κ€α΄œΙ΄Ι΄ΙͺΙ΄Ι’ ᴑᴇʙ-Κ™α΄€sᴇᴅ α΄€α΄˜α΄˜ΚŸΙͺα΄„α΄€α΄›Ιͺᴏɴs.

ለ #Programmer specially ለ #web_developer አαˆͺፍ Browser αŠα‹
Object Oriented Programming(Ex-1)
1️⃣ Create a program by using java or any other OOP platform which calculates age.
β€”β€”β€”β€”β€”β€”β€”β€”β€”
The program should include the following:
⭕️ β€œMain” & β€œDate” classes
⭕️ accepts Name & dob(date, month, year)
⭕️ accepts CurrentDate(date, month, year)
⭕️ and β€œCalcAge” function

πŸ“ŒFinally to give a teaser of what the user interaction and display will looks:

Enter Name: Student
Enter Date of Birth:
Date - 20
Month - 8
Year - 1992
β€”β€”β€”β€”β€”β€”β€”
Enter Current Date:
Date - 28
Month - 10
Year - 2019
β€”β€”β€”β€”β€”β€”β€”
Student’s Age is: 27 Y, 2 M, 8 D.
β€”β€”β€”β€”β€”β€”β€”
N.B. In the above abbreviation Y, M, D is Years, Months & Dates respectively.

As Always:

Have a LitπŸ”₯Figuring-Out Folks πŸ™ŒπŸ½
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming
@freecodecs
AI Programming pinned Β«Object Oriented Programming(Ex-1) 1️⃣ Create a program by using java or any other OOP platform which calculates age. β€”β€”β€”β€”β€”β€”β€”β€”β€” The program should include the following: ⭕️ β€œMain” & β€œDate” classes ⭕️ accepts Name & dob(date, month, year) ⭕️ accepts CurrentDate(date…»
Answer / Part 1 Explaining - OOP(Ex-1)
Understanding the scenario
β€”β€”β€”β€”β€”β€”β€”β€”β€”
So before we start the coding process we must understand the problem, how Gregorian’s and Ethiopian’s Calendar πŸ“† work, & how age calculating could be done.

β€’Okey .... y’all just subtract date of birth from current dateπŸ˜‰ easy right !

❓But, how it could be done, mean do we subtract all or each of values such as dates, months & years separately
❓What if month of (date of birth) greater than current month / it becomes negative/
❓Is each of years months or each of months days differs

YES, YES ....... Yes

πŸ“Œ This is why we need logic and cases to solve low level problems upward to higher

>>start:

πŸ“£ </ Gregorian Calendar >
β€’Each year has 12 months
β€’Each months has different dates the highest is 31 and the lowest is 28
β€’Leap year is February which is 2nd month 29 days and on non-leap year 28 days

πŸ“£ </ Ethiopian Calendar >
β€’Each year has 13 months
β€’Each 12 months has 30 days and the last one has 5 or 6 days
β€’Leap year is Pagume/αŒ·αŒαˆœαŠ• which is 13th month 6 days & on non-leap year 5 days
β€”β€”β€”β€”β€”β€”
πŸ“† How to calculate Leap Years πŸ“†
Pseudo Code (Gregorian)
If (year%4 = 0)
February = 29
else
February = 28

β€’Which means if the year is divided by 4 without the remainder then February month has 29 days and the reverse/else which is false means it has 28 days.

Pseudo Code (Ethiopian)
If (year%4 = 3)
Pagume = 6
else
Pagume = 5
β€’In the Ethiopian calendar leap is different only the reminder which the year divided by 4 is becomes only 3 then it’s leap year otherwise it’s not-leap year.
β€”β€”β€”β€”β€”β€”
Note: declare months[] array with the following variables for months days in Gregorian calendar.

months[] ={31,February,31,30,31,30,31,31,30,31,30,31}

NB. February is a variable declared previously on leap year or not-leap year
β€”β€”β€”β€”β€”β€”

There are two cases to deal with to calculate the age from date of birth (DOB)
⭕️ Case 1: subtracting without carry forwarded
Ex: Current: 2019.10.28
DOP: 1992.08.20
β€”β€”β€”β€”β€”β€”β€”β€”
Age : 27 years, 2 months, 8 days

⭕️ Case 1:
When we subtract from current date with carry forwarded from month or year
Ex: Current: 2019.10.28
DOP: 1992.12.30
β€”β€”β€”β€”β€”β€”β€”β€”
Age : 26, 8, 29

πŸ“ŒSo to point the problem in this πŸ‘†πŸ½ example we cannot subtract 30 from 28 it will be come -2 this means there is no date called -2 but we can lend from the month, if we lend from month we must know how many days the month contains so we must check from the array we declared previously. But for the month we can borrow 12 or 13 months from year.

Pseudo Code (Case 1)
If (birthDate > curDate)
curMonth = curMonth - 1
curDate = curDate + months[curMonth]
If (birthMonth > curMonth)
curYear = curYear - 1
curMonth = curMonth +12

Pseudo Code (Case 2)
calcDate = curDate - birthDate
calcMonth = curMonth - birthMonth
calcYear = curYear - birthYear

We will Post the Program Coded in JAVA
language today! Stay Tuned 😳

As Always:

Have a Lit πŸ”₯Study Folks πŸ™ŒπŸ½
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming
@freecodecs
Main.java
2.3 KB
OOP Ex-1a (Java Code)
β€”β€”β€”β€”β€”β€”β€”β€”β€”
The attached java file is age calculator in Gregorian Calendar also the answer for object oriented exercise-1 which we explained the logic earlier.

Next : We will post Ethiopian Calendar Age Calculator. Stay Tuned 😳
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming @freecodecs
Have a LitπŸ”₯Practice Folks πŸ™ŒπŸ½
Main_G.java
2.8 KB
OOP Ex-1b (Java Code)
β€”β€”β€”β€”β€”β€”β€”β€”β€”
The attached java file is age calculator in Ethiopian Calendar.

N.B: In this file we included some validation on current date, which validates if DOB(date of birth) year is greater than the current date year

i.e. DOB Year 2020
Current Year 2019


- Current Date is incorrect ! or
Student will born in the future?

N.B: And also on texts, such as singular to plural date numbers on outputs by adding β€˜s’ letter.

i.e. If date is grater than 1 it will correct the word β€œday, month, year” to β€œdays, months, years” respectively

- 20 years, 1 month, 3 days.
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming @freecodecs
Have a LitπŸ”₯Practice Folks πŸ™ŒπŸ½
πŸ‘‰ Thinking Twice Code Once! 😏
Java Compiler for Android
πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡

https://t.me/freecodecs/202

Cpp Compiler for Android
πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡
https://t.me/freecodecs/201

W3school offline for Android
πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡
https://t.me/freecodecs/95
αŠ₯αŠ•αŠ³αŠ• 1 ሺ 494αŠ›α‹ α‹¨αˆ˜α‹αˆŠα‹΅ α‰ α‹“αˆ α‰ αˆ°αˆ‹αˆ αŠ α‹°αˆ¨αˆ³α‰½αˆα‘α‘ α‰ α‹“αˆ‰ α‹¨αˆ°αˆ‹αˆ αŠ₯αŠ“ α‹¨αˆ˜αˆ¨α‹³α‹³α‰΅ α‰ α‹“αˆ αŠ₯αŠ•α‹²αˆ†αŠ•αˆαŠ• αŠ₯αŠ•αˆ˜αŠ›αˆˆαŠ• πŸ•Œ መልካም α‰ α‹“αˆ πŸ•Œ
β€”β€”β€”β€”β€”β€”β€”β€”β€”
AI Programming @freecodecs
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ”† α•Όαͺα—― ᎒αͺ α‘•α•Όα—©α‘Žα€α—΄ α‘­α–‡αͺα‘•α—΄α”‘α”‘αͺα–‡ α‘Žα—©α—°α—΄ αžα†α¦α—΄(α‘•αͺα–‡α—΄ Ꮖ3 ᎒αͺ α‘•αͺα–‡α—΄ α‘•αͺα–‡α—΄ Ꮖ7) πŸ”†
Pc αˆ΅α‰΅αŒˆα‹™ αŠ₯αŠ•α‹³α‰΅α‰ αˆ‰πŸ˜œ
πŸ‘‰ Size=4 mb
πŸ‘‰ time= 1 minute
cpu-z_1.80-@freecodecs.exe
1.6 MB
የ pc information αŠ₯α‹«αŠ•α‹³αŠ•α‹±αŠ• α‹¨αˆšα‹«αˆ³α‹­ like #cpu #ram ...
AI Programming pinned Β«DB - Oracle Exercise 1 :Answers β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” β€’Ans Ex 1 SELECT * FROM JOBS WHERE JOB_TITLE LIKE β€˜%A_%’; β€’Ans Ex 2 SELECT DISTINCT MIN_SALARY, MAX_SALARY FROM JOBS; β€’Ans Ex 3 SELECT DEPARTMENT_NAME FROM DEPARTMENTS WHERE LOCATION_ID = 1700; β€’Ans Ex 4…»
Linux-processes.pdf
236.1 KB
Process (OS)
β€”β€”β€”β€”β€”β€”β€”β€”β€”
The attached pdf file shows how to display processes, create, execute and terminate process.

NB : you can implement the codes on C program on Linux
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming @freecodecs
Have a LitπŸ”₯Practice Folks πŸ™ŒπŸ½
first course CS,SE,IT.zip
6 MB
Programming 1 (cpp)
introduction of computer Science
And Final exam (programming 1)
πŸ˜‚ Have a break have a joke πŸ˜‚
πŸ…‘πŸ…”πŸ…’πŸ…£ πŸ…¦πŸ…”πŸ…‘πŸ…’πŸ…˜πŸ…£πŸ…”
-----------------------
πŸ”† α‹¨α‰°αˆˆα‹«α‹© software ከነ crake file
like β˜‘οΈadobe products
β˜‘οΈ Operating system
β˜‘οΈ Programming app
and more πŸ‘β€πŸ—¨
download αˆ›αˆ¨αŒ α‰΅α‰½αˆ‹αˆ‹α‰Ή አαˆͺፍ website αŠ“α‰Έα‹

πŸ‘‰ allpcworld.com

πŸ‘‰ getintopc.com
β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming @freecodecs
OOP Ex-2 (Java)
β€”β€”β€”β€”β€”β€”β€”β€”β€”
β€œAccount” type has the following members :
β€’ Balance
β€’ Rate
β€’ Deposit
β€’ Withdraw
β€’ Interest Calculation

β€œSaving Account” is a type of account that implements β€˜Account’ as follows
β€’ A client can not withdraw more than 80% of their balance
β€’ Interest rate is 8%
β€’ A client is charged 5% of their withdrawal amount every time they withdraw

β€œCurrent Account” implements β€˜Account’ and has the following characteristics
β€’ A client can withdraw upto 90% of their balance with minimum withdraw of 2000
β€’ Interest rate is 12%
β€’ Not charged for withdrawal

Q. Solve this problem using Java programming language.
β€”β€”β€”β€”β€”β€”β€”β€”β€”
Join The Underground Coding Movement!
AI Programming @freecodecs
AI Programming pinned Β«OOP Ex-2 (Java) β€”β€”β€”β€”β€”β€”β€”β€”β€” β€œAccount” type has the following members : β€’ Balance β€’ Rate β€’ Deposit β€’ Withdraw β€’ Interest Calculation β€œSaving Account” is a type of account that implements β€˜Account’ as follows β€’ A client can not withdraw more than 80% of their…»